Mac Guides | Samples

MonoMac.Foundation.NSSet Class

An unordered collection of distinct items.

See Also: NSSet

Syntax

[MonoMac.Foundation.Register("NSSet", true)]
public class NSSet : NSObject, IEnumerable<NSObject>

Remarks

The following example shows how to create a set

c# Example

// Create the set out of four objects
var myColors = new NSSet (UIColor.Red, UIColor.Blue, UIColor.Yellow, UIColor.Red);

// The resulting array will only contain Red, Blue and Yellow
UIColor [] asArray = myColors.ToArray<UIColor> ();

Requirements

Namespace: MonoMac.Foundation
Assembly: XamMac (in XamMac.dll)
Assembly Versions: 0.0.0.0

The members of MonoMac.Foundation.NSSet are listed below.

See Also: NSObject

Public Constructors

Default constructor that initializes a new instance of this class with no parameters.
Creates a set from an NSArray of objects.
A constructor that initializes the object from the data stored in the unarchiver object.
NSSet(params NSObject[])
Constructor to call on derived classes when the derived class has an [Export] constructor.
A constructor used when creating managed representations of unmanaged objects; Called by the runtime.
NSSet(params Object[])
NSSet(params String[])
Creates a set from an array of strings.

Public Properties

[read-only]
AnyObjectNSObject.
[read-only]
override
ClassHandleIntPtr. The handle for this class.
[read-only]
CountUInt32.

Public Methods

Contains(NSObject) : Boolean
Contains(Object) : Boolean
static
CreateSet() : NSSet
Enumerate(NSSetEnumerator)
GetEnumerator() : IEnumerator<NSObject>
Enumerate over the NSObjects in the set.
IntersectsSet(NSSet) : Boolean
IsEqualToSet(NSSet) : Boolean
IsSubsetOf(NSSet) : Boolean
static
MakeNSObjectSet<T>(T[]) : NSSet
ToArray<T>() : T[]
Returns the contents of the set as a strongly typed array.

Protected Methods

override
Dispose(Boolean)
Releases the resourced used by the NSSet object.

Public Operators

Explicitly Implemented Interface Members

NSSet$IEnumerable.GetEnumeratorEnumerate over the NSObjects in the set.