Class Constructors
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
Class(IntPtr) |
Creates an instance from an unmanaged handle. |
Class(String) |
Creates a class from a name. |
Class(Type) |
Creates a class from the specified Type. |
Class(IntPtr, Boolean) |
Creates an instance from an unmanaged handle. |
Class(IntPtr)
Creates an instance from an unmanaged handle.
public Class (IntPtr handle);
new ObjCRuntime.Class : nativeint -> ObjCRuntime.Class
Parameters
- handle
-
IntPtr
nativeint
The pointer to the unmanaged Objective-C Class object.
Applies to
Class(String)
Creates a class from a name.
public Class (string name);
new ObjCRuntime.Class : string -> ObjCRuntime.Class
Parameters
- name
- String
The name of the Objective-C class.
Remarks
Xamarin.iOS will look up the class in the Objective-C runtime and return the instance or throw an ArgumentException if the class could not be found.
Applies to
Class(Type)
Creates a class from the specified Type.
public Class (Type type);
new ObjCRuntime.Class : Type -> ObjCRuntime.Class
Parameters
- type
- Type
A managed type.
Remarks
This will trigger the class registration with the Xamarin.iOS runtime.
Applies to
Class(IntPtr, Boolean)
Creates an instance from an unmanaged handle.
[Foundation.Preserve(Conditional=true)]
public Class (IntPtr handle, bool owns);
new ObjCRuntime.Class : nativeint * bool -> ObjCRuntime.Class
Parameters
- handle
-
IntPtr
nativeint
The pointer to the unmanaged Objective-C Class object.
- owns
- Boolean
This parameter is ignored for this class.
- Attributes
Remarks
This constructor is required for the Xamarin.iOS runtime to be able to automatically create an instance of this class given a particular Objective-C class handle.