Class.GetHandle Method

Definition

Overloads

Name Description
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 ObjCRuntime.NativeHandle GetHandle(string name);
static member GetHandle : string -> ObjCRuntime.NativeHandle

Parameters

name
String

The name of the class to lookup.

Returns

The unmanaged handle for the specified Objective-C class.

Applies to

GetHandle(Type)

Gets the Objective-C handle of the given type.

public static ObjCRuntime.NativeHandle GetHandle(Type type);
public static ObjCRuntime.NativeHandle GetHandle(Type? type);
static member GetHandle : Type -> ObjCRuntime.NativeHandle

Parameters

type
Type

Type for an NSObject-derived class

Returns

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 RegisterAttribute attribute, the name specified in this Register attribute is the name that will be used for looking up or register the class.

Applies to