System.Collections.Immutable Namespace
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.
Contains interfaces and classes that define immutable collections.
Immutable |
Provides methods for creating an array that is immutable; meaning it cannot be changed once it is created. NuGet package: System.Collections.Immutable (about immutable collections and how to install) |
Immutable |
A writable array accessor that can be converted into an ImmutableArray<T> instance without allocating extra memory. NuGet package: System.Collections.Immutable (about immutable collections and how to install) |
Immutable |
Provides a set of initialization methods for instances of the ImmutableDictionary<TKey,TValue> class. NuGet package: System.Collections.Immutable (about immutable collections and how to install) |
Immutable |
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: System.Collections.Immutable (about immutable collections and how to install) |
Immutable |
Represents an immutable, unordered collection of keys and values. NuGet package: System.Collections.Immutable (about immutable collections and how to install) |
Immutable |
Provides a set of initialization methods for instances of the ImmutableHashSet<T> class. NuGet package: System.Collections.Immutable (about immutable collections and how to install) |
Immutable |
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: System.Collections.Immutable (about immutable collections and how to install) |
Immutable |
Represents an immutable, unordered hash set. NuGet package: System.Collections.Immutable (about immutable collections and how to install) |
Immutable |
Contains interlocked exchange mechanisms for immutable collections. NuGet package: System.Collections.Immutable (about immutable collections and how to install) |
Immutable |
Provides a set of initialization methods for instances of the ImmutableList<T> class. NuGet package: System.Collections.Immutable (about immutable collections and how to install) |
Immutable |
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: System.Collections.Immutable (about immutable collections and how to install) |
Immutable |
Represents an immutable list, which is a strongly typed list of objects that can be accessed by index. NuGet package: System.Collections.Immutable (about immutable collections and how to install) |
Immutable |
Provides a set of initialization methods for instances of the ImmutableQueue<T> class. NuGet package: System.Collections.Immutable (about immutable collections and how to install) |
Immutable |
Represents an immutable queue. NuGet package: System.Collections.Immutable (about immutable collections and how to install) |
Immutable |
Provides a set of initialization methods for instances of the ImmutableSortedDictionary<TKey,TValue> class. NuGet package: System.Collections.Immutable (about immutable collections and how to install) |
Immutable |
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: System.Collections.Immutable (about immutable collections and how to install) |
Immutable |
Represents an immutable sorted dictionary. NuGet package: System.Collections.Immutable (about immutable collections and how to install) |
Immutable |
Provides a set of initialization methods for instances of the ImmutableSortedSet<T> class. NuGet package: System.Collections.Immutable (about immutable collections and how to install) |
Immutable |
Represents a sorted set that enables changes with little or no memory allocations, and efficiently manipulates or builds immutable sorted sets. NuGet package: System.Collections.Immutable (about immutable collections and how to install) |
Immutable |
Represents an immutable sorted set implementation. NuGet package: System.Collections.Immutable (about immutable collections and how to install) |
Immutable |
Provides a set of initialization methods for instances of the ImmutableStack<T> class. NuGet package: System.Collections.Immutable (about immutable collections and how to install) |
Immutable |
Represents an immutable stack. NuGet package: System.Collections.Immutable (about immutable collections and how to install) |
IImmutable |
Represents an immutable collection of key/value pairs. NuGet package: System.Collections.Immutable (about immutable collections and how to install) |
IImmutable |
Represents a list of elements that cannot be modified. NuGet package: System.Collections.Immutable (about immutable collections and how to install) |
IImmutable |
Represents an immutable first-in, first-out collection of objects. NuGet package: System.Collections.Immutable (about immutable collections and how to install) |
IImmutable |
Represents a set of elements that can only be modified by creating a new instance of the set. NuGet package: System.Collections.Immutable (about immutable collections and how to install) |
IImmutable |
Represents an immutable last-in-first-out (LIFO) collection. NuGet package: System.Collections.Immutable (about immutable collections and how to install) |
With immutable collections, you can:
- Share a collection in a way that its consumer can be assured that the collection never changes.
- Provide implicit thread safety in multi-threaded applications (no locks required to access collections).
- Follow functional programming practices.
- Modify a collection during enumeration, while ensuring that the original collection does not change.
The immutable collection classes are available as part of the core .NET libraries, however they're not part of the core class library distributed with .NET Framework. For .NET Framework 4.6.2 and later apps, the classes are available through NuGet packages.
.NET-feedback
.NET is een open source project. Selecteer een koppeling om feedback te geven: