Causes the current class or interface to inherit the attributes, fields, properties, methods, and events from another class or interface.
Inherits typename
If used, the Inherits statement must be the first non-blank, non-comment line in a class definition.
An interface may inherit from more than one interface, but a class may only inherit from one other class.
This example uses the Inherits statement to show how a class named ThisClass
can inherit the fields, properties, methods and events from another class named AnotherClass
.
Public Class ThisClass Inherits AnotherClass ' Add code to override, overload, or extend members ' inherited from the base class. ...' Variable, property, method, and event declarations here. End Class
MustInherit | NotInheritable | MyBase | MyClass |