System.Collections.Immutable by Microsoft

<PackageReference Include="System.Collections.Immutable" Version="1.3.0" />

 ImmutableArray

public static class ImmutableArray
A set of initialization methods for instances of ImmutableArray<T>.
public static int BinarySearch<T>(this ImmutableArray<T> array, T value)

Searches an entire one-dimensional sorted ImmutableArray<T> for a specific element, using the IComparable<T> generic interface implemented by each element of the ImmutableArray<T> and by the specified object.

public static int BinarySearch<T>(this ImmutableArray<T> array, T value, IComparer<T> comparer)

Searches an entire one-dimensional sorted ImmutableArray<T> for a value using the specified IComparer<T> generic interface.

public static int BinarySearch<T>(this ImmutableArray<T> array, int index, int length, T value)

Searches a range of elements in a one-dimensional sorted ImmutableArray<T> for a value, using the IComparable<T> generic interface implemented by each element of the ImmutableArray<T> and by the specified value.

public static int BinarySearch<T>(this ImmutableArray<T> array, int index, int length, T value, IComparer<T> comparer)

Searches a range of elements in a one-dimensional sorted ImmutableArray<T> for a value, using the specified IComparer<T> generic interface.

public static ImmutableArray<T> Create<T>()

Creates an empty ImmutableArray<T>.

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

Creates an ImmutableArray<T> with the specified element as its only member.

public static ImmutableArray<T> Create<T>(T item1, T item2)

Creates an ImmutableArray<T> with the specified elements.

public static ImmutableArray<T> Create<T>(T item1, T item2, T item3)

Creates an ImmutableArray<T> with the specified elements.

public static ImmutableArray<T> Create<T>(T item1, T item2, T item3, T item4)

Creates an ImmutableArray<T> with the specified elements.

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

Creates an empty ImmutableArray<T>.

public static ImmutableArray<T> Create<T>(T[] items, int start, int length)

Initializes a new instance of the ImmutableArray<T> struct.

public static ImmutableArray<T> Create<T>(ImmutableArray<T> items, int start, int length)

Initializes a new instance of the ImmutableArray<T> struct.

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

Initializes a new instance of the Builder class.

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

Initializes a new instance of the Builder class.

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

Creates an ImmutableArray<T> populated with the contents of the specified sequence.

public static ImmutableArray<TResult> CreateRange<TSource, TResult>(ImmutableArray<TSource> items, Func<TSource, TResult> selector)

Initializes a new instance of the ImmutableArray<T> struct.

public static ImmutableArray<TResult> CreateRange<TSource, TResult>(ImmutableArray<TSource> items, int start, int length, Func<TSource, TResult> selector)

Initializes a new instance of the ImmutableArray<T> struct.

public static ImmutableArray<TResult> CreateRange<TSource, TArg, TResult>(ImmutableArray<TSource> items, Func<TSource, TArg, TResult> selector, TArg arg)

Initializes a new instance of the ImmutableArray<T> struct.

public static ImmutableArray<TResult> CreateRange<TSource, TArg, TResult>(ImmutableArray<TSource> items, int start, int length, Func<TSource, TArg, TResult> selector, TArg arg)

Initializes a new instance of the ImmutableArray<T> struct.

public static ImmutableArray<TSource> ToImmutableArray<TSource>(this IEnumerable<TSource> items)

Enumerates a sequence exactly once and produces an immutable array of its contents.