NSSet.ToArray<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 the contents of the set as a strongly typed array.
public T[] ToArray<T> () where T : class, ObjCRuntime.INativeObject;
member this.ToArray : unit -> 'T[] (requires 'T : null and 'T :> ObjCRuntime.INativeObject)
Type Parameters
- T
Strongly typed version of the array that you want to get, must be a class that derives from NSObject.
Returns
T[]
An array of type T with the contents of the set.
Remarks
The following example shows how to get an array of UIFonts
var myColors = new NSSet (UIColor.Red, UIColor.Blue, UIColor.Yellow);
UIColor [] asArray = myColors.ToArray<UIColor> ();