ImmutableList.ToImmutableList Metoda

Definicja

Przeciążenia

ToImmutableList<TSource>(IEnumerable<TSource>)

Wylicza sekwencję i tworzy niezmienną listę jej zawartości.

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

Tworzy niezmienną listę na podstawie bieżącej zawartości kolekcji konstruktora.

ToImmutableList<TSource>(IEnumerable<TSource>)

Źródło:
ImmutableList.cs
Źródło:
ImmutableList.cs
Źródło:
ImmutableList.cs

Wylicza sekwencję i tworzy niezmienną listę jej zawartości.

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

Parametry typu

TSource

Typ elementów w sekwencji.

Parametry

source
IEnumerable<TSource>

Sekwencja do wyliczenia.

Zwraca

ImmutableList<TSource>

Niezmienna lista zawierająca elementy w określonej sekwencji.

Dotyczy

.NET 9 i inne wersje
Produkt Wersje
.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)

Źródło:
ImmutableList.cs
Źródło:
ImmutableList.cs
Źródło:
ImmutableList.cs

Tworzy niezmienną listę na podstawie bieżącej zawartości kolekcji konstruktora.

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

Parametry typu

TSource

Typ elementów na liście.

Parametry

builder
ImmutableList<TSource>.Builder

Konstruktor do utworzenia niezmiennej listy na podstawie.

Zwraca

ImmutableList<TSource>

Niezmienna lista zawierająca bieżącą zawartość w kolekcji konstruktora.

Dotyczy

.NET 9 i inne wersje
Produkt Wersje
.NET Core 3.0, Core 3.1, 5, 6, 7, 8, 9