Click to Rate and Give Feedback
MSDN
MSDN Library
Visual Studio .NET
Reference
Statements
F-P Statements
 Inherits Statement
This page is specific to
Microsoft Visual Studio 2003/.NET Framework 1.1

Other versions are also available for the following:
Visual Basic Language Reference
Inherits Statement

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

Inherits typename

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

© 2009 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement | Site Feedback
Page view tracker