Type.GetTypeHandle Method (Object)

 

Gets the handle for the Type of a specified object.

Namespace:   System
Assembly:  mscorlib (in mscorlib.dll)

static member GetTypeHandle : 
        o:Object -> RuntimeTypeHandle

Parameters

o
Type: System.Object

The object for which to get the type handle.

Return Value

Type: System.RuntimeTypeHandle

The handle for the Type of the specified Object.

Exception Condition
ArgumentNullException

o is null.

The handles are valid only in the application domain in which they were obtained.

The following example defines the class MyClass1, gets an instance of it, and retrieves the runtime handle of the object.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 1.1
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 4.0
Windows Phone Silverlight
Available since 7.0
Return to top
Show: