Note that there are some explanatory texts on larger screens.

plurals
  1. POIs this multiple inheritance? or another syntax for Inherits/Implements like C#?
    primarykey
    data
    text
    <p>I am trying to work out why this works</p> <pre><code>Public Interface IFullService Inherits ISerializableObjectLayerService, IVersionService &lt;OperationContract()&gt; Function StartTrac() As OperationResult(Of Boolean) &lt;OperationContract()&gt; Function StopTrac() As OperationResult(Of Boolean) &lt;OperationContract()&gt; Function IsTracRunning() As OperationResult(Of Boolean) End Interface </code></pre> <p>An interface doesn't allow you to specify that it "implements" another interface, however in my case I needed to state that I have both interfaces, just by chance I put a comma in and entered the other interface, built and ran my unit tests and it works...</p> <p>Previously I have been trying to follow a single inheritance tree such as</p> <pre><code>&lt;ServiceContract()&gt; Public Interface IFullService Inherits IVersionService &lt;OperationContract()&gt; Function StartTrac() As OperationResult(Of Boolean) &lt;OperationContract()&gt; Function StopTrac() As OperationResult(Of Boolean) &lt;OperationContract()&gt; Function IsTracRunning() As OperationResult(Of Boolean) End Interface &lt;ServiceContract()&gt; Public Interface IVersionService Inherits ISerializableObjectLayerService &lt;OperationContract()&gt; Function GetVersionsSince(ByVal VersionNumber As Long, IncludeBetas As Boolean) As OperationResult(Of Core.Setting.MemoryBmsReleaseInfo()) End Interface </code></pre> <p>As you can see here the IFullService inherits the IVersionService which then inherits the IVersionService. However in my case I needed a way for something to implement IVersionService without implementing the ISerializableObjectLayerService which is what lead me to my "working" solution.</p> <p>Unfortunately I can't work out how to find out what exactly this is doing. I have search through stackoverflow, google, msdn and I can't find an example with Inherits , </p> <p>Could some guru please provide some information on what exactly this is accomplishing (would be great if you can provide a MSDN link), as I don't like doing something that I don't understand (as it can lead to problem in the future that you can work out :D)</p> <p>Hopefully this question isn't too noobish :D</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. COdamn, can't answer my own post as I don't have enough "rep" but here is my answer http://stackoverflow.com/questions/5682227/vb-net-multiple-inheritance-in-an-interface I knew that .NET didn't support Multiple Inheritance, hence this idea worked just puzzled me, so it seems Multiple Inheritance is supported, but only in Interfaces, it is only Classes that don't support multi inheritance. Wish the MSDN articles on Inherits keyword would have explained this situation. Bah, so sorry for the wasted question, seems my search keywords just hadn't come up with the right result before I posted.
      singulars
    2. COMSDN does explain this situation: see the [remarks on the Inherits keyword](http://msdn.microsoft.com/en-us/library/1yk8s7sk(v=vs.71).aspx). (Though having said that I wouldn't be surprised if there are a bunch of other articles that don't even mention it.)
      singulars
    3. COCheers mate, your right, now I am getting the links they are just slapping me in the face, at the time I was trying to just identify it through an example ie. Inherits IType, IType2 so I could find out what it is (believing that MI wasn't supported in .NET) so yeah, searching with the blinkers on didn't help me much :P cheers
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload