NSArray.ArrayFromHandleFunc<T>(IntPtr, Func<IntPtr,T>) 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 a strongly-typed C# array of the parametrized type from a handle to an NSArray.
public static T[] ArrayFromHandleFunc<T> (IntPtr handle, Func<IntPtr,T> createObject);
static member ArrayFromHandleFunc : nativeint * Func<nativeint, 'T> -> 'T[]
Type Parameters
- T
Parameter type, determines the kind of array returned.
Parameters
- handle
-
IntPtr
nativeint
Pointer (handle) to the unmanaged object.
Returns
An C# array with the values.
Remarks
Use this method to get a set of NSObject arrays from a handle to an NSArray. Instead of wrapping the results in NSObjects, the code invokes your method to create the return value.
int [] args = NSArray.ArrayFromHandle<int> (someHandle, (x) => (int) x);