ImmutableList.ToImmutableList メソッド

定義

オーバーロード

ToImmutableList<TSource>(IEnumerable<TSource>)

シーケンスを列挙し、その内容の変更できないリストを生成します。

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

ビルダーのコレクションの現在の内容から、変更できないリストを作成します。

ToImmutableList<TSource>(IEnumerable<TSource>)

ソース:
ImmutableList.cs
ソース:
ImmutableList.cs
ソース:
ImmutableList.cs

シーケンスを列挙し、その内容の変更できないリストを生成します。

C#
public static System.Collections.Immutable.ImmutableList<TSource> ToImmutableList<TSource> (this System.Collections.Generic.IEnumerable<TSource> source);

型パラメーター

TSource

シーケンス内の要素の型。

パラメーター

source
IEnumerable<TSource>

列挙するシーケンス。

戻り値

ImmutableList<TSource>

指定されたシーケンス内の項目を含む、変更できないリスト。

適用対象

.NET 9 およびその他のバージョン
製品 バージョン
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
UWP 10.0

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

ソース:
ImmutableList.cs
ソース:
ImmutableList.cs
ソース:
ImmutableList.cs

ビルダーのコレクションの現在の内容から、変更できないリストを作成します。

C#
public static System.Collections.Immutable.ImmutableList<TSource> ToImmutableList<TSource> (this System.Collections.Immutable.ImmutableList<TSource>.Builder builder);

型パラメーター

TSource

一覧内の要素の型です。

パラメーター

builder
ImmutableList<TSource>.Builder

変更できないリストを作成するためのビルダー。

戻り値

ImmutableList<TSource>

ビルダーのコレクションの現在の内容を含む、変更できないリスト。

適用対象

.NET 9 およびその他のバージョン
製品 バージョン
.NET Core 3.0, Core 3.1, 5, 6, 7, 8, 9