This documentation is archived and is not being maintained.

7.5.1 Class Base Specification

Visual Studio .NET 2003

A class declaration may include a base type specification that defines the direct base type of the class. If a class declaration has no explicit base type, the direct base type is implicitly Object. For example:

Class Base
End Class

Class Derived
    Inherits Base
End Class

Classes may only derive from Object and classes. It is invalid for a class to derive from System.ValueType, System.Enum, System.Array, or System.Delegate.

Every class has exactly one direct base class, and circularity in derivation is prohibited. It is not possible to derive from a NotInheritable class, and the accessibility domain of the base class must be the same as or a superset of the accessibility domain of the class itself.

ClassBase ::= Inherits TypeName LineTerminator

See Also

7.2 Interface Implementation | 7.5.2 Class Members | 7.5 Classes | Inherits Statement (Visual Basic Language Reference)

Show: