This documentation is archived and is not being maintained.

GCHandle to IntPtr Conversion

.NET Framework 1.1

A GCHandle is stored using an internal integer representation.

[Visual Basic]
returnValue = GCHandle.op_Explicit(value)
[C#]
public static explicit operator IntPtr(
 GCHandle value
);
[C++]
public: static IntPtr op_Explicit();
[JScript]
returnValue = IntPtr(value);

[Visual Basic] In Visual Basic, you can use the conversion operators defined by a type, but you cannot define your own.

[JScript] In JScript, you can use the conversion operators defined by a type, but you cannot define your own.

Arguments [Visual Basic, JScript]

value
The GCHandle for which the integer is required.

Parameters [C#]

value
The GCHandle for which the integer is required.

Return Value

The integer value.

Remarks

This method can be used to retrieve the integer value from a GCHandle.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework, Common Language Infrastructure (CLI) Standard

.NET Framework Security: 

See Also

GCHandle Structure | GCHandle Members | System.Runtime.InteropServices Namespace | GCHandleType

Show: