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