ImmutableArray ImmutableArray ImmutableArray ImmutableArray Class

Definition

Provides methods for creating an array that is immutable; meaning it cannot be changed once it is created.

NuGet package: System.Collections.Immutable (about immutable collections and how to install)

public ref class ImmutableArray abstract sealed
public static class ImmutableArray
type ImmutableArray = class
Public Module ImmutableArray
Inheritance
ImmutableArrayImmutableArrayImmutableArrayImmutableArray

Methods

BinarySearch<T>(ImmutableArray<T>, T) BinarySearch<T>(ImmutableArray<T>, T) BinarySearch<T>(ImmutableArray<T>, T) BinarySearch<T>(ImmutableArray<T>, T)

Searches the sorted immutable array for a specified element using the default comparer and returns the zero-based index of the element, if it's found.

BinarySearch<T>(ImmutableArray<T>, T, IComparer<T>) BinarySearch<T>(ImmutableArray<T>, T, IComparer<T>) BinarySearch<T>(ImmutableArray<T>, T, IComparer<T>) BinarySearch<T>(ImmutableArray<T>, T, IComparer<T>)

Searches a sorted immutable array for a specified element and returns the zero-based index of the element, if it's found.

BinarySearch<T>(ImmutableArray<T>, Int32, Int32, T) BinarySearch<T>(ImmutableArray<T>, Int32, Int32, T) BinarySearch<T>(ImmutableArray<T>, Int32, Int32, T) BinarySearch<T>(ImmutableArray<T>, Int32, Int32, T)

Searches a sorted immutable array for a specified element and returns the zero-based index of the element, if it's found.

BinarySearch<T>(ImmutableArray<T>, Int32, Int32, T, IComparer<T>) BinarySearch<T>(ImmutableArray<T>, Int32, Int32, T, IComparer<T>) BinarySearch<T>(ImmutableArray<T>, Int32, Int32, T, IComparer<T>) BinarySearch<T>(ImmutableArray<T>, Int32, Int32, T, IComparer<T>)

Searches a sorted immutable array for a specified element and returns the zero-based index of the element.

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

Creates an immutable array that contains the specified objects.

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

Creates an immutable array that contains the specified objects.

Create<T>(ImmutableArray<T>, Int32, Int32) Create<T>(ImmutableArray<T>, Int32, Int32) Create<T>(ImmutableArray<T>, Int32, Int32) Create<T>(ImmutableArray<T>, Int32, Int32)

Creates an immutable array with the specified objects from another immutable array.

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

Creates an immutable array with specified objects from another array.

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

Creates an immutable array from the specified array of objects.

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

Creates an immutable array that contains the specified object.

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

Creates an empty immutable array.

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

Creates an immutable array that contains the specified objects.

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

Creates a mutable array that can be converted to an ImmutableArray without allocating new memory.

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

Creates a mutable array that can be converted to an ImmutableArray without allocating new memory.

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

Creates a new ImmutableArray<T> populated with the specified items.

CreateRange<TSource,TArg,TResult>(ImmutableArray<TSource>, Func<TSource,TArg,TResult>, TArg) CreateRange<TSource,TArg,TResult>(ImmutableArray<TSource>, Func<TSource,TArg,TResult>, TArg) CreateRange<TSource,TArg,TResult>(ImmutableArray<TSource>, Func<TSource,TArg,TResult>, TArg) CreateRange<TSource,TArg,TResult>(ImmutableArray<TSource>, Func<TSource,TArg,TResult>, TArg)

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

CreateRange<TSource,TArg,TResult>(ImmutableArray<TSource>, Int32, Int32, Func<TSource,TArg,TResult>, TArg) CreateRange<TSource,TArg,TResult>(ImmutableArray<TSource>, Int32, Int32, Func<TSource,TArg,TResult>, TArg) CreateRange<TSource,TArg,TResult>(ImmutableArray<TSource>, Int32, Int32, Func<TSource,TArg,TResult>, TArg) CreateRange<TSource,TArg,TResult>(ImmutableArray<TSource>, Int32, Int32, Func<TSource,TArg,TResult>, TArg)

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

CreateRange<TSource,TResult>(ImmutableArray<TSource>, Func<TSource,TResult>) CreateRange<TSource,TResult>(ImmutableArray<TSource>, Func<TSource,TResult>) CreateRange<TSource,TResult>(ImmutableArray<TSource>, Func<TSource,TResult>) CreateRange<TSource,TResult>(ImmutableArray<TSource>, Func<TSource,TResult>)

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

CreateRange<TSource,TResult>(ImmutableArray<TSource>, Int32, Int32, Func<TSource,TResult>) CreateRange<TSource,TResult>(ImmutableArray<TSource>, Int32, Int32, Func<TSource,TResult>) CreateRange<TSource,TResult>(ImmutableArray<TSource>, Int32, Int32, Func<TSource,TResult>) CreateRange<TSource,TResult>(ImmutableArray<TSource>, Int32, Int32, Func<TSource,TResult>)

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

ToImmutableArray<TSource>(IEnumerable<TSource>) ToImmutableArray<TSource>(IEnumerable<TSource>) ToImmutableArray<TSource>(IEnumerable<TSource>) ToImmutableArray<TSource>(IEnumerable<TSource>)

Creates an immutable array from the specified collection.

ToImmutableArray<TSource>(ImmutableArray<TSource>) ToImmutableArray<TSource>(ImmutableArray<TSource>) ToImmutableArray<TSource>(ImmutableArray<TSource>) ToImmutableArray<TSource>(ImmutableArray<TSource>)

Creates an immutable array from the current contents of the builder's array.

Applies to

Thread Safety

This type is thread safe.