![]() |
VOOZH | about |
dotnet add package System.Collections.Immutable --version 10.0.9
NuGet\Install-Package System.Collections.Immutable -Version 10.0.9
<PackageReference Include="System.Collections.Immutable" Version="10.0.9" />
<PackageVersion Include="System.Collections.Immutable" Version="10.0.9" />Directory.Packages.props
<PackageReference Include="System.Collections.Immutable" />Project file
paket add System.Collections.Immutable --version 10.0.9
#r "nuget: System.Collections.Immutable, 10.0.9"
#:package System.Collections.Immutable@10.0.9
#addin nuget:?package=System.Collections.Immutable&version=10.0.9Install as a Cake Addin
#tool nuget:?package=System.Collections.Immutable&version=10.0.9Install as a Cake Tool
This package provides collections that are thread safe and guaranteed to never change their contents, also known as immutable collections. Like strings, any methods that perform modifications will not change the existing instance but instead return a new instance. For efficiency reasons, the implementation uses a sharing mechanism to ensure that newly created instances share as much data as possible with the previous instance while ensuring that operations have a predictable time complexity.
The System.Collections.Immutable library is built-in as part of the shared framework in .NET Runtime. The package can be installed when you need to use it in other target frameworks.
using System.Collections.Immutable;
// Create immutable set of strings
ImmutableHashSet<string> colors = ImmutableHashSet.Create("Red", "Green", "Blue");
// Create a new set by adding and removing items from the original set
ImmutableHashSet<string> colorsModified = colors.Remove("Red").Add("Orange");
foreach (string s in colorsModified)
{
Console.WriteLine(s);
}
/* Example output:
Blue
Green
Orange
*/
The main types provided by this library are:
System.Collections.Immutable.ImmutableArraySystem.Collections.Immutable.ImmutableArray<T>System.Collections.Immutable.ImmutableDictionarySystem.Collections.Immutable.ImmutableDictionary<TKey,TValue>System.Collections.Immutable.ImmutableHashSetSystem.Collections.Immutable.ImmutableHashSet<T>System.Collections.Immutable.ImmutableListSystem.Collections.Immutable.ImmutableList<T>System.Collections.Immutable.ImmutableQueueSystem.Collections.Immutable.ImmutableQueue<T>System.Collections.Immutable.ImmutableSortedDictionarySystem.Collections.Immutable.ImmutableSortedDictionary<TKey,TValue>System.Collections.Immutable.ImmutableSortedSetSystem.Collections.Immutable.ImmutableSortedSet<T>System.Collections.Immutable.ImmutableStackSystem.Collections.Immutable.ImmutableStack<T>System.Collections.Frozen.FrozenDictionarySystem.Collections.Frozen.FrozenDictionary<TKey, TValue>System.Collections.Frozen.FrozenSetSystem.Collections.Frozen.FrozenSet<T>System.Collections.Immutable is released as open source under the MIT license. Bug reports and contributions are welcome at the GitHub repository.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 net5.0 was computed. net5.0-windows net5.0-windows was computed. net6.0 net6.0 was computed. net6.0-android net6.0-android was computed. net6.0-ios net6.0-ios was computed. net6.0-maccatalyst net6.0-maccatalyst was computed. net6.0-macos net6.0-macos was computed. net6.0-tvos net6.0-tvos was computed. net6.0-windows net6.0-windows was computed. net7.0 net7.0 was computed. net7.0-android net7.0-android was computed. net7.0-ios net7.0-ios was computed. net7.0-maccatalyst net7.0-maccatalyst was computed. net7.0-macos net7.0-macos was computed. net7.0-tvos net7.0-tvos was computed. net7.0-windows net7.0-windows was computed. net8.0 net8.0 is compatible. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 is compatible. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 netcoreapp2.0 was computed. netcoreapp2.1 netcoreapp2.1 was computed. netcoreapp2.2 netcoreapp2.2 was computed. netcoreapp3.0 netcoreapp3.0 was computed. netcoreapp3.1 netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 netstandard2.0 is compatible. netstandard2.1 netstandard2.1 was computed. |
| .NET Framework | net461 net461 was computed. net462 net462 is compatible. net463 net463 was computed. net47 net47 was computed. net471 net471 was computed. net472 net472 was computed. net48 net48 was computed. net481 net481 was computed. |
| MonoAndroid | monoandroid monoandroid was computed. |
| MonoMac | monomac monomac was computed. |
| MonoTouch | monotouch monotouch was computed. |
| Tizen | tizen40 tizen40 was computed. tizen60 tizen60 was computed. |
| Xamarin.iOS | xamarinios xamarinios was computed. |
| Xamarin.Mac | xamarinmac xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos xamarinwatchos was computed. |
Showing the top 5 NuGet packages that depend on System.Collections.Immutable:
| Package | Downloads |
|---|---|
|
System.Reflection.Metadata
This package provides a low-level .NET (ECMA-335) metadata reader and writer. It's geared for performance and is the ideal choice for building higher-level libraries that intend to provide their own object model, such as compilers. The metadata format is defined by the ECMA-335 - Common Language Infrastructure (CLI) specification. The System.Reflection.Metadata library is built-in as part of the shared framework in .NET Runtime. The package can be installed when you need to use it in other target frameworks. |
|
|
Microsoft.CodeAnalysis.Common
A shared package used by the Microsoft .NET Compiler Platform ("Roslyn"). Do not install this package manually, it will be added as a prerequisite by other packages that require it. More details at https://aka.ms/roslyn-packages This package was built from the source at https://github.com/dotnet/roslyn/commit/16f9bd284cd49604ac82998bfe778a8eb16d4347. |
|
|
Microsoft.CodeAnalysis.CSharp
.NET Compiler Platform ("Roslyn") support for C#, Microsoft.CodeAnalysis.CSharp.dll. More details at https://aka.ms/roslyn-packages This package was built from the source at https://github.com/dotnet/roslyn/commit/16f9bd284cd49604ac82998bfe778a8eb16d4347. |
|
|
Humanizer.Core
Humanizer core package that contains the library and the neutral language (English) resources |
|
|
Microsoft.CodeAnalysis.Workspaces.Common
A shared package used by the .NET Compiler Platform ("Roslyn") including support for analyzing projects and solutions. Do not install this package manually, it will be added as a prerequisite by other packages that require it. More details at https://aka.ms/roslyn-packages This package was built from the source at https://github.com/dotnet/roslyn/commit/16f9bd284cd49604ac82998bfe778a8eb16d4347. |
Showing the top 20 popular GitHub repositories that depend on System.Collections.Immutable:
| Repository | Stars |
|---|---|
|
icsharpcode/ILSpy
.NET Decompiler with support for PDB generation, ReadyToRun, Metadata (&more) - cross-platform!
|
|
|
dotnet/roslyn
The Roslyn .NET compiler provides C# and Visual Basic languages with rich code analysis APIs.
|
|
|
abpframework/abp
Open-source web application framework for ASP.NET Core! Offers an opinionated architecture to build enterprise software solutions with best practices on top of the .NET. Provides the fundamental infrastructure, cross-cutting-concern implementations, startup templates, application modules, UI themes, tooling and documentation.
|
|
|
aspnetboilerplate/aspnetboilerplate
ASP.NET Boilerplate - Web Application Framework
|
|
|
chocolatey/choco
Chocolatey - the package manager for Windows
|
|
|
JamesNK/Newtonsoft.Json
Json.NET is a popular high-performance JSON framework for .NET
|
|
|
mRemoteNG/mRemoteNG
mRemoteNG is the next generation of mRemote, open source, tabbed, multi-protocol, remote connections manager.
|
|
|
dotnet/orleans
Cloud Native application framework for .NET
|
|
|
Humanizr/Humanizer
Humanizer meets all your .NET needs for manipulating and displaying strings, enums, dates, times, timespans, numbers and quantities
|
|
|
dotnet/machinelearning
ML.NET is an open source and cross-platform machine learning framework for .NET.
|
|
|
neuecc/UniRx
Reactive Extensions for Unity
|
|
|
dotnet/reactive
The Reactive Extensions for .NET
|
|
|
NancyFx/Nancy
Lightweight, low-ceremony, framework for building HTTP based services on .Net and Mono
|
|
|
MessagePack-CSharp/MessagePack-CSharp
Extremely Fast MessagePack Serializer for C#(.NET, .NET Core, Unity, Xamarin). / msgpack.org[C#]
|
|
|
ldqk/Masuit.Tools
全龄段友好的C#万能工具库,码数吐司库,包含一些常用的操作类,大都是静态类,加密解密,反射操作,权重随机筛选算法,分布式短id,表达式树,linq扩展,文件压缩,多线程下载,硬件信息,字符串扩展方法,日期时间扩展操作,中国农历,大文件拷贝,图像裁剪,验证码,断点续传,集合扩展、Excel导出等常用封装。诸多功能集一身,代码量不到2MB!
|
|
|
StackExchange/StackExchange.Redis
General purpose redis client
|
|
|
dotnet/msbuild
The Microsoft Build Engine (MSBuild) is the build platform for .NET and Visual Studio.
|
|
|
ServiceStack/ServiceStack
Thoughtfully architected, obscenely fast, thoroughly enjoyable web services for all
|
|
|
openiddict/openiddict-core
Flexible and versatile OAuth 2.0/OpenID Connect stack for .NET
|
|
|
MapsterMapper/Mapster
A fast, fun and stimulating object to object Mapper
|
| Version | Downloads | Last Updated |
|---|---|---|
| 11.0.0-preview.5.26302.115 | 499 | 6/9/2026 |
| 11.0.0-preview.4.26230.115 | 1,842 | 5/12/2026 |
| 11.0.0-preview.3.26207.106 | 2,073 | 4/14/2026 |
| 11.0.0-preview.2.26159.112 | 3,835 | 3/10/2026 |
| 11.0.0-preview.1.26104.118 | 2,276 | 2/10/2026 |
| 10.0.9 | 92,420 | 6/9/2026 |
| 10.0.8 | 478,463 | 5/12/2026 |
| 10.0.7 | 576,097 | 4/21/2026 |
| 10.0.6 | 184,457 | 4/14/2026 |
| 10.0.5 | 808,774 | 3/12/2026 |
| 10.0.4 | 89,460 | 3/10/2026 |
| 10.0.3 | 1,227,671 | 2/10/2026 |
| 10.0.2 | 1,429,211 | 1/13/2026 |
| 10.0.1 | 1,519,416 | 12/9/2025 |
| 9.0.17 | 4,169 | 6/9/2026 |
| 9.0.16 | 31,351 | 5/12/2026 |
| 9.0.15 | 400,085 | 4/14/2026 |
| 9.0.14 | 169,462 | 3/10/2026 |
| 9.0.13 | 161,964 | 2/10/2026 |
| 9.0.12 | 191,210 | 1/13/2026 |