Click or drag to resize
GCHandle Structure
Provides a way to access a managed object from unmanaged memory.

Namespace: System.Runtime.InteropServices
Assembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax
C#
public struct GCHandle

The GCHandle type exposes the following members.

Methods
  NameDescription
Public methodAddrOfPinnedObject
Retrieves the address of an object in a Pinned handle.
Public methodStatic memberAlloc(Object)
Allocates a Normal handle for the specified object.
Public methodStatic memberAlloc(Object, GCHandleType)
Allocates a handle of the specified type for the specified object.
Public methodEquals
Determines whether the specified GCHandle object is equal to the current GCHandle object.
(Overrides ValueTypeEquals(Object).)
Public methodFree
Releases a GCHandle.
Public methodGetHashCode
Returns an identifier for the current GCHandle object.
(Overrides ValueTypeGetHashCode.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
See Also