NSArray.GetItem<T>(UIntPtr) 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.
Returns the element at the specified index in the NSArray, as a strongly-typed object.
public T GetItem<T>(UIntPtr index) where T : class, ObjCRuntime.INativeObject;
public T? GetItem<T>(UIntPtr index) where T : class, ObjCRuntime.INativeObject;
member this.GetItem : unativeint -> 'T (requires 'T : null and 'T :> ObjCRuntime.INativeObject)
Type Parameters
- T
The type to return the element as. Must be a class that implements INativeObject.
Parameters
- index
-
UIntPtr
unativeint
The zero-based index of the element to retrieve.
Returns
The element at index, or null if the element cannot be converted to T.
Exceptions
index is greater than or equal to the array's count.