Edytuj

Udostępnij za pośrednictwem


Class.GetHandle Method

Definition

Overloads

GetHandle(String)

Returns the unmanaged handle to the Objective-C Class.

GetHandle(Type)

Gets the Objective-C handle of the given type.

GetHandle(String)

Returns the unmanaged handle to the Objective-C Class.

public static IntPtr GetHandle (string name);
static member GetHandle : string -> nativeint

Parameters

name
String

The name of the class to lookup.

Returns

IntPtr

nativeint

The unmanaged handle for the specified Objective-C class.

Applies to

GetHandle(Type)

Gets the Objective-C handle of the given type.

public static IntPtr GetHandle (Type type);
static member GetHandle : Type -> nativeint

Parameters

type
Type

Type for an NSObject-derived class

Returns

IntPtr

nativeint

The Objective-C handle to the object.

Remarks

This method looks up the Objective-C handle for the specified type, or registers the specified type with the Objective-C runtime if it was not previously registered.

The class must be derived from NSObject. If the class is flagged with the [Register] attribute, the name specified in this Register attribute is the name that will be used for looking up or register the class.

Applies to