ImmutableList.ToImmutableList 方法

定义

重载

ToImmutableList<TSource>(IEnumerable<TSource>)

枚举序列,并生成其内容的不可变列表。

ToImmutableList<TSource>(ImmutableList<TSource>.Builder)

从生成器集合的当前内容创建不可变列表。

ToImmutableList<TSource>(IEnumerable<TSource>)

枚举序列,并生成其内容的不可变列表。

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

序列中元素的类型。

参数

source
IEnumerable<TSource>

要枚举的序列。

返回

ImmutableList<TSource>

一个不可变列表,其中包含指定序列中的项。

适用于

ToImmutableList<TSource>(ImmutableList<TSource>.Builder)

从生成器集合的当前内容创建不可变列表。

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>
<Extension()>
Public Function ToImmutableList(Of TSource) (builder As ImmutableList(Of TSource).Builder) As ImmutableList(Of TSource)

类型参数

TSource

列表中元素的类型。

参数

builder
ImmutableList<TSource>.Builder

要从中创建不可变列表的生成器。

返回

ImmutableList<TSource>

包含生成器集合中的当前内容的不可变列表。

适用于