GetType Method
[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
Gets the Type of the current instance.
Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Syntax
'Declaration
Public Function GetType As Type
public Type GetType()
public:
Type^ GetType()
member GetType : unit -> Type
public function GetType() : Type
Return Value
Type: System. . :: . .Type
The exact runtime type of the current instance.
Remarks
For two objects x and y that have identical runtime types, Object.ReferenceEquals(x.GetType(),y.GetType()) returns true.
The Type object exposes the metadata associated with the class of the current Object.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see dd66cd4c-b087-415f-9c3e-94e3a1835f74.