Class.GetHandle Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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);
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 [Register] attribute, the name specified in this Register attribute is the name that will be used for looking up or register the class.