Export (0) Print
Expand All

System.Collections.Immutable Namespace

The System.Collections.Immutable namespace contains interfaces and classes that define immutable collections. These classes are supported starting with .NET Framework 4.5. Use them to build apps that target the desktop, Windows Store, Portable Class Library and Windows Phone 8.

The APIs for immutable collections aren't part of the core class library distributed with the .NET Framework; they're available via NuGet. To install these APIs:

  1. Open your project in Visual Studio, and then choose Manage NuGet Packages from the Project menu.

    (Optionally, in the drop-down list box in the middle pane, choose Include Prerelease; this option will give you access to new prerelease versions of the immutable classes, as they become available.)

  2. In the right pane, search online for the Microsoft.Immutable.Collections (Microsoft.Bcl.Immutable) package.

See the introduction to immutable collections for general information, and read about other .NET Framework NuGet packages.

  Class Description
Public class ImmutableArray [This topic is preliminary and is subject to change.]
Provides methods for creating an array that is immutable; meaning it cannot be changed once it is created. NuGet package: Microsoft.Bcl.Immutable (about immutable collections and how to install)
Public class ImmutableArray<T>.Builder [This topic is preliminary and is subject to change.]
A writable array accessor that can be converted into an ImmutableArray<T> instance without allocating extra memory. NuGet package: Microsoft.Bcl.Immutable (about immutable collections and how to install)
Public class ImmutableDictionary Provides a set of initialization methods for instances of the ImmutableDictionary<TKey, TValue> class. NuGet package: Microsoft.Bcl.Immutable (about immutable collections and how to install)
Public class ImmutableDictionary<TKey, TValue> Represents an immutable, unordered collection of keys and values. NuGet package: Microsoft.Bcl.Immutable (about immutable collections and how to install)
Public class ImmutableDictionary<TKey, TValue>.Builder Represents a hash map that mutates with little or no memory allocations and that can produce or build on immutable hash map instances very efficiently. NuGet package: Microsoft.Bcl.Immutable (about immutable collections and how to install)
Public class ImmutableHashSet Provides a set of initialization methods for instances of the ImmutableHashSet<T> class. NuGet package: Microsoft.Bcl.Immutable (about immutable collections and how to install)
Public class ImmutableHashSet<T> Represents an immutable, unordered hash set. NuGet package: Microsoft.Bcl.Immutable (about immutable collections and how to install)
Public class ImmutableHashSet<T>.Builder Represents a hash set that mutates with little or no memory allocations and that can produce or build on immutable hash set instances very efficiently. NuGet package: Microsoft.Bcl.Immutable (about immutable collections and how to install)
Public class ImmutableInterlocked Contains interlocked exchange mechanisms for immutable collections. NuGet package: Microsoft.Bcl.Immutable (about immutable collections and how to install)
Public class ImmutableList Provides a set of initialization methods for instances of the ImmutableList<T> class. NuGet package: Microsoft.Bcl.Immutable (about immutable collections and how to install)
Public class ImmutableList<T> Represents an immutable list, which is a strongly typed list of objects that can be accessed by index. NuGet package: Microsoft.Bcl.Immutable (about immutable collections and how to install)
Public class ImmutableList<T>.Builder Represents a list that mutates with little or no memory allocations and that can produce or build on immutable list instances very efficiently. NuGet package: Microsoft.Bcl.Immutable (about immutable collections and how to install)
Public class ImmutableQueue Provides a set of initialization methods for instances of the ImmutableQueue<T> class. NuGet package: Microsoft.Bcl.Immutable (about immutable collections and how to install)
Public class ImmutableQueue<T> Represents an immutable queue. NuGet package: Microsoft.Bcl.Immutable (about immutable collections and how to install)
Public class ImmutableSortedDictionary Provides a set of initialization methods for instances of the ImmutableSortedDictionary<TKey, TValue> class. NuGet package: Microsoft.Bcl.Immutable (about immutable collections and how to install)
Public class ImmutableSortedDictionary<TKey, TValue> Represents an immutable sorted dictionary. NuGet package: Microsoft.Bcl.Immutable (about immutable collections and how to install)
Public class ImmutableSortedDictionary<TKey, TValue>.Builder Represents a sorted dictionary that mutates with little or no memory allocations and that can produce or build on immutable sorted dictionary instances very efficiently. NuGet package: Microsoft.Bcl.Immutable (about immutable collections and how to install)
Public class ImmutableSortedSet Provides a set of initialization methods for instances of the ImmutableSortedSet<T> class. NuGet package: Microsoft.Bcl.Immutable (about immutable collections and how to install)
Public class ImmutableSortedSet<T> Represents an immutable sorted set implementation. NuGet package: Microsoft.Bcl.Immutable (about immutable collections and how to install)
Public class ImmutableSortedSet<T>.Builder Represents a sorted set that enables changes with little or no memory allocations, and efficiently manipulates or builds immutable sorted sets. NuGet package: Microsoft.Bcl.Immutable (about immutable collections and how to install)
Public class ImmutableStack Provides a set of initialization methods for instances of the ImmutableStack<T> class. NuGet package: Microsoft.Bcl.Immutable (about immutable collections and how to install)
Public class ImmutableStack<T> Represents an immutable stack. NuGet package: Microsoft.Bcl.Immutable (about immutable collections and how to install)

  Structure Description
Public structure ImmutableArray<T> Represents an array that is immutable; meaning it cannot be changed once it is created.
Public structure ImmutableArray<T>.Enumerator An array enumerator.
Public structure ImmutableDictionary<TKey, TValue>.Enumerator Enumerates the contents of the immutable dictionary without allocating any memory. NuGet package: Microsoft.Bcl.Immutable (about immutable collections and how to install)
Public structure ImmutableHashSet<T>.Enumerator Enumerates the contents of the immutable hash set without allocating any memory. NuGet package: Microsoft.Bcl.Immutable (about immutable collections and how to install)
Public structure ImmutableList<T>.Enumerator Enumerates the contents of a binary tree. NuGet package: Microsoft.Bcl.Immutable (about immutable collections and how to install)
Public structure ImmutableQueue<T>.Enumerator Enumerates the contents of an immutable queue without allocating any memory. NuGet package: Microsoft.Bcl.Immutable (about immutable collections and how to install)
Public structure ImmutableSortedDictionary<TKey, TValue>.Enumerator Enumerates the contents of a binary tree. NuGet package: Microsoft.Bcl.Immutable (about immutable collections and how to install)
Public structure ImmutableSortedSet<T>.Enumerator Enumerates the contents of a binary tree. NuGet package: Microsoft.Bcl.Immutable (about immutable collections and how to install)
Public structure ImmutableStack<T>.Enumerator Enumerates the contents of an immutable stack without allocating any memory. NuGet package: Microsoft.Bcl.Immutable (about immutable collections and how to install)

  Interface Description
Public interface IImmutableDictionary<TKey, TValue> Represents an immutable collection of key/value pairs. NuGet package: Microsoft.Bcl.Immutable (about immutable collections and how to install)
Public interface IImmutableList<T> Represents a list of elements that cannot be modified. NuGet package: Microsoft.Bcl.Immutable (about immutable collections and how to install)
Public interface IImmutableQueue<T> Represents an immutable first-in, first-out collection of objects. NuGet package: Microsoft.Bcl.Immutable (about immutable collections and how to install)
Public interface IImmutableSet<T> Represents a set of elements that can only be modified by creating a new instance of the set. NuGet package: Microsoft.Bcl.Immutable (about immutable collections and how to install)
Public interface IImmutableStack<T> Represents an immutable last-in-first-out (LIFO) collection. NuGet package: Microsoft.Bcl.Immutable (about immutable collections and how to install)
Show:
© 2014 Microsoft