ImmutableList ImmutableList ImmutableList ImmutableList Class

Definition

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 ref class ImmutableList abstract sealed
public static class ImmutableList
type ImmutableList = class
Public Module ImmutableList
Inheritance
ImmutableListImmutableListImmutableListImmutableList

Methods

Create<T>() Create<T>() Create<T>() Create<T>()

Creates an empty immutable list.

Create<T>(T) Create<T>(T) Create<T>(T) Create<T>(T)

Creates a new immutable list that contains the specified item.

Create<T>(T[]) Create<T>(T[]) Create<T>(T[]) Create<T>(T[])

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

CreateBuilder<T>() CreateBuilder<T>() CreateBuilder<T>() CreateBuilder<T>()

Creates a new immutable list builder.

CreateRange<T>(IEnumerable<T>) CreateRange<T>(IEnumerable<T>) CreateRange<T>(IEnumerable<T>) CreateRange<T>(IEnumerable<T>)

Creates a new immutable list that contains the specified items.

IndexOf<T>(IImmutableList<T>, T, Int32) IndexOf<T>(IImmutableList<T>, T, Int32) IndexOf<T>(IImmutableList<T>, T, Int32) IndexOf<T>(IImmutableList<T>, T, Int32)

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.

IndexOf<T>(IImmutableList<T>, T, Int32, Int32) IndexOf<T>(IImmutableList<T>, T, Int32, Int32) IndexOf<T>(IImmutableList<T>, T, Int32, Int32) IndexOf<T>(IImmutableList<T>, T, Int32, Int32)

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.

IndexOf<T>(IImmutableList<T>, T) IndexOf<T>(IImmutableList<T>, T) IndexOf<T>(IImmutableList<T>, T) IndexOf<T>(IImmutableList<T>, T)

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

IndexOf<T>(IImmutableList<T>, T, IEqualityComparer<T>) IndexOf<T>(IImmutableList<T>, T, IEqualityComparer<T>) IndexOf<T>(IImmutableList<T>, T, IEqualityComparer<T>) IndexOf<T>(IImmutableList<T>, T, IEqualityComparer<T>)

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

LastIndexOf<T>(IImmutableList<T>, T) LastIndexOf<T>(IImmutableList<T>, T) LastIndexOf<T>(IImmutableList<T>, T) LastIndexOf<T>(IImmutableList<T>, T)

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

LastIndexOf<T>(IImmutableList<T>, T, IEqualityComparer<T>) LastIndexOf<T>(IImmutableList<T>, T, IEqualityComparer<T>) LastIndexOf<T>(IImmutableList<T>, T, IEqualityComparer<T>) LastIndexOf<T>(IImmutableList<T>, T, IEqualityComparer<T>)

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

LastIndexOf<T>(IImmutableList<T>, T, Int32) LastIndexOf<T>(IImmutableList<T>, T, Int32) LastIndexOf<T>(IImmutableList<T>, T, Int32) LastIndexOf<T>(IImmutableList<T>, T, Int32)

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.

LastIndexOf<T>(IImmutableList<T>, T, Int32, Int32) LastIndexOf<T>(IImmutableList<T>, T, Int32, Int32) LastIndexOf<T>(IImmutableList<T>, T, Int32, Int32) LastIndexOf<T>(IImmutableList<T>, T, Int32, Int32)

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.

Remove<T>(IImmutableList<T>, T) Remove<T>(IImmutableList<T>, T) Remove<T>(IImmutableList<T>, T) Remove<T>(IImmutableList<T>, T)

Removes the specified value from this list.

RemoveRange<T>(IImmutableList<T>, IEnumerable<T>) RemoveRange<T>(IImmutableList<T>, IEnumerable<T>) RemoveRange<T>(IImmutableList<T>, IEnumerable<T>) RemoveRange<T>(IImmutableList<T>, IEnumerable<T>)

Removes the specified values from this list.

Replace<T>(IImmutableList<T>, T, T) Replace<T>(IImmutableList<T>, T, T) Replace<T>(IImmutableList<T>, T, T) Replace<T>(IImmutableList<T>, T, T)

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

ToImmutableList<TSource>(IEnumerable<TSource>) ToImmutableList<TSource>(IEnumerable<TSource>) ToImmutableList<TSource>(IEnumerable<TSource>) ToImmutableList<TSource>(IEnumerable<TSource>)

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

ToImmutableList<TSource>(ImmutableList<TSource>) ToImmutableList<TSource>(ImmutableList<TSource>) ToImmutableList<TSource>(ImmutableList<TSource>) ToImmutableList<TSource>(ImmutableList<TSource>)

Applies to

Thread Safety

This type is thread safe.