METHOD

ImmutableList.Add

Returns a collection containing the extra value. Retain the returned version.

Formal Syntax & Structure

csharp syntaxcsharp
ImmutableList<T> Add(T value)

Working Example

Example Snippetcsharp
using System.Collections.Immutable;var a = ImmutableList.Create(1);a = a.Add(2);System.Console.WriteLine(a.Count);
C# & .NET Reference