Inherits Statement
The document is archived and information here might be outdated

Inherits Statement

Causes the current class or interface to inherit the attributes, fields, properties, methods, and events from another class or interface.

Inherits typename


Required. The name of a class or interface being inherited by the class or interface in which the Inherits statement is used.


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

See Also

MustInherit | NotInheritable | MyBase | MyClass | Inheritance

© 2016 Microsoft