Causes the current class or interface to inherit the attributes, fields, properties, methods, and events from another class or interface.
Parts
- typename
- Required. The name of a class or interface being inherited by the class or interface in which the Inherits statement is used.
Remarks
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.
Example
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
See Also
MustInherit | NotInheritable | MyBase | MyClass | Inheritance