ImmutableList.ToImmutableList ImmutableList.ToImmutableList ImmutableList.ToImmutableList ImmutableList.ToImmutableList Method

定義

多載

ToImmutableList<TSource>(IEnumerable<TSource>) ToImmutableList<TSource>(IEnumerable<TSource>) ToImmutableList<TSource>(IEnumerable<TSource>) ToImmutableList<TSource>(IEnumerable<TSource>)

列舉序列,並產生其內容的不可變清單。Enumerates a sequence and produces an immutable list of its contents.

ToImmutableList<TSource>(ImmutableList<TSource>) ToImmutableList<TSource>(ImmutableList<TSource>) ToImmutableList<TSource>(ImmutableList<TSource>)

ToImmutableList<TSource>(IEnumerable<TSource>) ToImmutableList<TSource>(IEnumerable<TSource>) ToImmutableList<TSource>(IEnumerable<TSource>) ToImmutableList<TSource>(IEnumerable<TSource>)

列舉序列,並產生其內容的不可變清單。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)

類型參數

TSource

序列中的項目類型。The type of the elements in the sequence.

參數

source
IEnumerable<TSource>

要列舉的序列。The sequence to enumerate.

傳回

ImmutableList<TSource>

不可變的清單,其中包含指定序列中的項目。An immutable list that contains the items in the specified sequence.

ToImmutableList<TSource>(ImmutableList<TSource>) ToImmutableList<TSource>(ImmutableList<TSource>) ToImmutableList<TSource>(ImmutableList<TSource>)

public:
generic <typename TSource>
[System::Runtime::CompilerServices::Extension]
 static System::Collections::Immutable::ImmutableList<TSource> ^ ToImmutableList(System::Collections::Immutable::ImmutableList<TSource>::Builder ^ builder);
public static System.Collections.Immutable.ImmutableList<TSource> ToImmutableList<TSource> (this System.Collections.Immutable.ImmutableList<TSource>.Builder builder);
static member ToImmutableList : System.Collections.Immutable.ImmutableList<'Source>.Builder -> System.Collections.Immutable.ImmutableList<'Source>

類型參數

TSource

參數

builder
ImmutableList<TSource>.Builder

傳回

ImmutableList<TSource>

適用於