Windows apps
Collapse the table of content
Expand the table of content

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)

public:
Type^ GetType()

Return Value

Type: System..::..Type
The exact runtime type of the current instance.

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.

Show:
© 2017 Microsoft