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
GetHandle(String) |
Returns the unmanaged handle to the Objective-C Class. |
GetHandle(Type) |
Gets the Objective-C handle of the given type. |
GetHandle(String)
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
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.