NSArray.FromArray<T>(NSArray) 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 weakly typed NSArray.
public static T[] FromArray<T> (Foundation.NSArray weakArray) where T : Foundation.NSObject;
static member FromArray : Foundation.NSArray -> 'T[] (requires 'T :> Foundation.NSObject)
Type Parameters
- T
Parameter type, determines the kind of array returned, limited to NSObject and subclasses of it.
Parameters
- weakArray
- NSArray
Handle to an weakly typed NSArray.
Returns
T[]
An C# array with the values.
Remarks
Use this method to get a set of NSObject arrays from an NSArray.
NSArray someArray = ...;
NSString [] values = NSArray.FromArray<CGImage> (someArray);