This documentation is archived and is not being maintained.

GCHandle Members

GCHandle overview

Public Properties

public propertyIsAllocated

Supported by the .NET Compact Framework.

Gets a value indicating whether the handle is allocated.
public propertyTarget

Supported by the .NET Compact Framework.

Gets or sets the object this handle represents.

Public Methods

public methodAddrOfPinnedObject

Supported by the .NET Compact Framework.

Retrieves the address of an object in a Pinned handle.
public methodstatic (Shared in Visual Basic)Alloc

Supported by the .NET Compact Framework.

Overloaded. Allocates a handle for the specified object.
public methodEquals (inherited from ValueType)

Supported by the .NET Compact Framework.

Overridden. Indicates whether this instance and a specified object are equal.
public methodFree

Supported by the .NET Compact Framework.

Releases a GCHandle.
public methodGetHashCode (inherited from ValueType)

Supported by the .NET Compact Framework.

Overridden. Returns the hash code for this instance.
public methodGetType (inherited from Object)

Supported by the .NET Compact Framework.

Gets the Type of the current instance.
public methodToString (inherited from ValueType)

Supported by the .NET Compact Framework.

Overridden. Returns the fully qualified type name of this instance.

Public Type Conversions

public operatorstatic (Shared in Visual Basic)GCHandle to IntPtr Conversion

Supported by the .NET Compact Framework.

A GCHandle is stored using an internal integer representation.
public operatorstatic (Shared in Visual Basic)IntPtr to GCHandle Conversion

Supported by the .NET Compact Framework.

A GCHandle is stored using an internal integer representation.

Protected Methods

protected methodFinalize (inherited from Object)

Supported by the .NET Compact Framework.

Overridden. Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.

In C# and C++, finalizers are expressed using destructor syntax.

protected methodMemberwiseClone (inherited from Object)

Supported by the .NET Compact Framework.

Creates a shallow copy of the current Object.

See Also

GCHandle Structure | System.Runtime.InteropServices Namespace

Show: