ImmutableList.ToImmutableList(IEnumerable<TSource>) ImmutableList.ToImmutableList(IEnumerable<TSource>) ImmutableList.ToImmutableList(IEnumerable<TSource>) ImmutableList.ToImmutableList(IEnumerable<TSource>) Method

Definition

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

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

Type Parameters

TSource

The type of the elements in the sequence.

Parameters

source
IEnumerable<TSource>

The sequence to enumerate.

Returns

ImmutableList<TSource>

An immutable list that contains the items in the specified sequence.

Applies to