Type::BaseType Property
Gets the type from which the current Type directly inherits.
Assembly: mscorlib (in mscorlib.dll)
Property Value
Type: System::TypeThe Type from which the current Type directly inherits, or nullptr if the current Type represents the Object class or an interface.
Implements
_Type::BaseTypeThe base type is the type from which the current type directly inherits. Object is the only type that does not have a base type, therefore nullptr is returned as the base type of Object.
Interfaces inherit from zero or more base interfaces; therefore, this property returns nullptr if the Type object represents an interface. The base interfaces can be determined with GetInterfaces or FindInterfaces.
If the current Type represents a constructed generic type, the base type reflects the generic arguments. For example, consider the following declarations:
For the constructed type C<int> (C(Of Integer) in Visual Basic), the BaseType property returns B<int>.
If the current Type represents a type parameter of a generic type definition, BaseType returns the class constraint, that is, the class the type parameter must inherit. If there is no class constraint, BaseType returns System::Object.
This property is read-only.
Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98, Windows CE, Windows Mobile for Smartphone, Windows Mobile for Pocket PC, Xbox 360, Zune
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.