NSObject.Alloc(Class) Method

Definition

Allocates an uninitialized instance of the specified class.

public static Foundation.NSObject Alloc(ObjCRuntime.Class kls);
static member Alloc : ObjCRuntime.Class -> Foundation.NSObject

Parameters

kls
Class

The class to allocate.

Returns

A new uninitialized NSObject instance.

Remarks

This method should typically be followed by a call to an init method to properly initialize the object.

Applies to