SetContainer Generic Class

Contains a Set. A SetContainer wraps a set value, to provide a mutable version of Set. See Set for more details on the Set type.

Namespace: Microsoft.Modeling
Assembly: Microsoft.Xrt.Runtime (in Microsoft.Xrt.Runtime.dll)

Usage

'Usage

Syntax

'Declaration
public class SetContainer<T> : ICollection<T>, IEnumerable<T>, 
    IEnumerable

GenericParameters

  • T

Remarks

SetContainers provide most of the Set operations, and are a wrapper for Set. An important difference is that a SetContainer is mutable, while a Set is immutable. Since SetContainer is a mutable type, equality is determined by equality of object reference. SetContainers do not directly provide LINQ expressions, because transforming a container would result in a new object reference.

To transform the content of a set container using a LINQ query, use Transform, which works on the Set value contained in the SetContainer.

This type is implemented as a wrapper around an instance of the Set. When modified, it actually creates a new instance of Set and updates a reference as if the original Set instance had been changed.

SetContainer replicates the interfaces of Set, but slightly changes the signature.

Most methods returning a collection in Set are of type void, because they modify the receiver instead of returning a new instance.

Inheritance Hierarchy

System.Object
  Microsoft.Modeling.SetContainer

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Platforms

Development Platforms

Microsoft Windows 7, Microsoft Windows Vista, Microsoft Windows XP SP2 or later, Microsoft Windows Server 2008, Microsoft Windows Server 2003

See Also

Reference

SetContainer Members
Microsoft.Modeling Namespace
Set Generic Class