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

See Also

Reference

Object Class

System Namespace