ImmutableArray Class

ImmutableArray Class

 

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)

Namespace:   System.Collections.Immutable
Assembly:  System.Collections.Immutable (in System.Collections.Immutable.dll)

System.Object
  System.Collections.Immutable.ImmutableArray

public static class ImmutableArray

NameDescription
System_CAPS_pubmethodSystem_CAPS_staticBinarySearch<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.

System_CAPS_pubmethodSystem_CAPS_staticBinarySearch<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.

System_CAPS_pubmethodSystem_CAPS_staticBinarySearch<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.

System_CAPS_pubmethodSystem_CAPS_staticBinarySearch<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.

System_CAPS_pubmethodSystem_CAPS_staticCreate<T>()

Creates an empty immutable array.

System_CAPS_pubmethodSystem_CAPS_staticCreate<T>(T)

Creates an immutable array that contains the specified object.

System_CAPS_pubmethodSystem_CAPS_staticCreate<T>(T, T)

Creates an immutable array that contains the specified objects.

System_CAPS_pubmethodSystem_CAPS_staticCreate<T>(T, T, T)

Creates an immutable array that contains the specified objects.

System_CAPS_pubmethodSystem_CAPS_staticCreate<T>(T, T, T, T)

Creates an immutable array that contains the specified objects.

System_CAPS_pubmethodSystem_CAPS_staticCreate<T>(T[])

Creates an immutable array from the specified array of objects.

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

Creates an immutable array with specified objects from another array.

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

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

System_CAPS_pubmethodSystem_CAPS_staticCreate<T>(IntPtr, Int32)

Creates an ImmutableArray with the specified blittable elements from another array.

System_CAPS_pubmethodSystem_CAPS_staticCreate<T, TDerived>(ImmutableArray<TDerived>)

Initializes a new instance of the ImmutableArray from the contents of the specified array, using a covariant static cast to reuse the existing array.

System_CAPS_pubmethodSystem_CAPS_staticCreateBuilder<T>()

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

System_CAPS_pubmethodSystem_CAPS_staticCreateBuilder<T>(Int32)

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

System_CAPS_pubmethodSystem_CAPS_staticCreateRange<T>(IEnumerable<T>)

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

System_CAPS_pubmethodSystem_CAPS_staticToImmutableArray<TSource>(IEnumerable<TSource>)

Creates an immutable array from the specified collection.

This type is thread safe.

Return to top
Show:
© 2016 Microsoft