NSArray.ToArray Method

Definition

Overloads

Name Description
ToArray()

Converts this NSArray to a C# array of NSObject, where NSNull elements are converted to null.

ToArray<TKey>()

Converts this NSArray to a strongly-typed C# array, where NSNull elements are converted to null.

ToArray()

Converts this NSArray to a C# array of NSObject, where NSNull elements are converted to null.

public Foundation.NSObject[] ToArray();
public Foundation.NSObject?[] ToArray();
member this.ToArray : unit -> Foundation.NSObject[]

Returns

A C# array of NSObject elements. Elements that are NSNull in the source array are represented as null.

Applies to

ToArray<TKey>()

Converts this NSArray to a strongly-typed C# array, where NSNull elements are converted to null.

public TKey[] ToArray<TKey>() where TKey : class, ObjCRuntime.INativeObject;
public TKey?[] ToArray<TKey>() where TKey : class, ObjCRuntime.INativeObject;
member this.ToArray : unit -> 'Key[] (requires 'Key : null and 'Key :> ObjCRuntime.INativeObject)

Type Parameters

TKey

The element type for the returned array. Must be a class that implements INativeObject.

Returns

TKey[]

A C# array of TKey elements. Elements that are NSNull in the source array are represented as null.

Applies to