Multiple Interface Inheritance

Visual Basic .NET does not support multiple class inheritance, but it does support multiple interface inheritance. If a class inherits from multiple interfaces, the class must implement all the members defined by all the interfaces the class inherits from.

When a class will implement multiple interfaces, indicate each interface in a comma-delimited list in the Implements statement.

Implements IDrawable2, IFoo

If two interfaces declare members with identical signatures, you will need to resolve the implementation in the implementing class. For example, suppose IDrawable2 and IFoo define identical Draw methods. You could indicate that a single Draw method provides the implementation for both interfaces.

 Public ...

Get Visual Basic® .NET Power Coding now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.