string[] arr = {"apple", "banana", "orange"}; NSSet set = NSSet.MakeNSObjectSet(arr);
class Person { public string Name { get; set; } public int Age { get; set; } } Person[] arr = { new Person { Name="John", Age=30 }, new Person { Name="Jane", Age=27 } }; NSSet set = NSSet.MakeNSObjectSet(arr);In these examples, the MakeNSObjectSet method is used to convert the string and custom object arrays to an NSSet containing NSObject versions of the objects. The package library for NSSet is likely to be Xamarin.iOS, which provides C# bindings for the iOS SDK and includes the NSSet class.