Language

ImmutableList.ToImmutableList Method

Definition

Overloads

Name Description
ToImmutableList(IEnumerable)

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

ToImmutableList(ImmutableList.Builder)

Creates an immutable list from the current contents of the builder's collection.

ToImmutableList(IEnumerable)

Source:
ImmutableList.cs
Source:
ImmutableList.cs
Source:
ImmutableList.cs
Source:
ImmutableList.cs
Source:
ImmutableList.cs
Source:
ImmutableList.cs
Source:
ImmutableList.cs

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

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

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

The sequence to enumerate.

Returns

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

Applies to

ToImmutableList(ImmutableList.Builder)

Source:
ImmutableList.cs
Source:
ImmutableList.cs
Source:
ImmutableList.cs
Source:
ImmutableList.cs
Source:
ImmutableList.cs
Source:
ImmutableList.cs
Source:
ImmutableList.cs

Creates an immutable list from the current contents of the builder's collection.

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

Public Function ToImmutableList(Of TSource) (builder As ImmutableList(Of TSource).Builder) As ImmutableList(Of TSource)

Type Parameters

TSource

The type of the elements in the list.

Parameters

builder
ImmutableList.Builder

The builder to create the immutable list from.

Returns

An immutable list that contains the current contents in the builder's collection.

Applies to