ImmutableArray.ToImmutableArray(IEnumerable<TSource>) ImmutableArray.ToImmutableArray(IEnumerable<TSource>) ImmutableArray.ToImmutableArray(IEnumerable<TSource>) ImmutableArray.ToImmutableArray(IEnumerable<TSource>) Method

Definition

Creates an immutable array from the specified collection.

public:
generic <typename TSource>
[System::Runtime::CompilerServices::Extension]
 static System::Collections::Immutable::ImmutableArray<TSource> ToImmutableArray(System::Collections::Generic::IEnumerable<TSource> ^ items);
public static System.Collections.Immutable.ImmutableArray<TSource> ToImmutableArray<TSource> (this System.Collections.Generic.IEnumerable<TSource> items);
static member ToImmutableArray : seq<'Source> -> System.Collections.Immutable.ImmutableArray<'Source>
<Extension()>
Public Function ToImmutableArray(Of TSource) (items As IEnumerable(Of TSource)) As ImmutableArray(Of TSource)

Type Parameters

TSource

The type of elements contained in items.

Parameters

items
IEnumerable<TSource>

The collection of objects to copy to the immutable array.

Returns

ImmutableArray<TSource>

An immutable array that contains the specified collection of objects.

Applies to