Question

I have a C# code as followed:

[Serializable]
public class RoundedHandle : GoRoundedRectangle, IGoHandle {

GoRoundedRectangle is a class. IGoHandle is an interface.

I had tried to convert it to VB .NET code:

<Serializable()>
Public Class RoundedHandle
Inherits GoRoundedRectangle, IGoHandle

However VB .NET only allows inheritance of one class only.

How can I make the conversion possible by including a class and an interface at the same time?

Thank you.

Was it helpful?

Solution

In vb.net you have to use the keyword 'Implements' to implement an interface (as shown in the code below):

<Serializable()>
Public Class RoundedHandle
    Inherits GoRoundedRectangle
    Implements IGoHandle
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top