System.Collections.Immutable by Microsoft

<PackageReference Include="System.Collections.Immutable" Version="5.0.0-preview.5.20278.1" />

.NET API 188,800 bytes

 ImmutableList

public static class ImmutableList
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)
public static ImmutableList<T> Create<T>()

Creates an empty immutable list.

public static ImmutableList<T> Create<T>(T item)

Creates a new immutable list that contains the specified item.

public static ImmutableList<T> Create<T>(T[] items)

Creates a new immutable list that contains the specified array of items.

public static Builder<T> CreateBuilder<T>()

Creates a new immutable list builder.

public static ImmutableList<T> CreateRange<T>(IEnumerable<T> items)

Creates a new immutable list that contains the specified items.

public static int IndexOf<T>(this IImmutableList<T> list, T item)

Searches for the specified object and returns the zero-based index of the first occurrence within the list.

public static int IndexOf<T>(this IImmutableList<T> list, T item, IEqualityComparer<T> equalityComparer)

Searches for the specified object and returns the zero-based index of the first occurrence within the list.

public static int IndexOf<T>(this IImmutableList<T> list, T item, int startIndex)

Searches for the specified object and returns the zero-based index of the first occurrence within the range of elements in the immutable list that extends from the specified index to the last element.

public static int IndexOf<T>(this IImmutableList<T> list, T item, int startIndex, int count)

Searches for the specified object and returns the zero-based index of the first occurrence within the range of elements in the immutable list that extends from the specified index to the last element.

public static int LastIndexOf<T>(this IImmutableList<T> list, T item)

Searches for the specified object and returns the zero-based index of the last occurrence within the entire immutable list.

public static int LastIndexOf<T>(this IImmutableList<T> list, T item, IEqualityComparer<T> equalityComparer)

Searches for the specified object and returns the zero-based index of the last occurrence within the entire immutable list.

public static int LastIndexOf<T>(this IImmutableList<T> list, T item, int startIndex)

Searches for the specified object and returns the zero-based index of the last occurrence within the range of elements in the immutable list that extends from the first element to the specified index.

public static int LastIndexOf<T>(this IImmutableList<T> list, T item, int startIndex, int count)

Searches for the specified object and returns the zero-based index of the last occurrence within the range of elements in the immutable list that extends from the first element to the specified index.

public static IImmutableList<T> Remove<T>(this IImmutableList<T> list, T value)

Removes the specified value from this list.

public static IImmutableList<T> RemoveRange<T>(this IImmutableList<T> list, IEnumerable<T> items)

Removes the specified values from this list.

public static IImmutableList<T> Replace<T>(this IImmutableList<T> list, T oldValue, T newValue)

Replaces the first equal element in the list with the specified element.

public static ImmutableList<TSource> ToImmutableList<TSource>(this IEnumerable<TSource> source)

Enumerates a sequence and produces an immutable list of its contents.

public static ImmutableList<TSource> ToImmutableList<TSource>(this Builder<TSource> builder)