Edit

Share via


ImmutableList.Create Method

Definition

Overloads

Create<T>()

Creates an empty immutable list.

Create<T>(ReadOnlySpan<T>)

Creates a new immutable list that contains the items from the specified span of items.

Create<T>(T)

Creates a new immutable list that contains the specified item.

Create<T>(T[])

Creates a new immutable list that contains the specified array of items.

Create<T>()

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

Creates an empty immutable list.

public:
generic <typename T>
 static System::Collections::Immutable::ImmutableList<T> ^ Create();
public static System.Collections.Immutable.ImmutableList<T> Create<T> ();
static member Create : unit -> System.Collections.Immutable.ImmutableList<'T>
Public Function Create(Of T) () As ImmutableList(Of T)

Type Parameters

T

The type of items to be stored in the .

Returns

An empty immutable list.

Applies to

Create<T>(ReadOnlySpan<T>)

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

Creates a new immutable list that contains the items from the specified span of items.

public:
generic <typename T>
 static System::Collections::Immutable::ImmutableList<T> ^ Create(ReadOnlySpan<T> items);
public static System.Collections.Immutable.ImmutableList<T> Create<T> (ReadOnlySpan<T> items);
public static System.Collections.Immutable.ImmutableList<T> Create<T> (scoped ReadOnlySpan<T> items);
static member Create : ReadOnlySpan<'T> -> System.Collections.Immutable.ImmutableList<'T>
Public Function Create(Of T) (items As ReadOnlySpan(Of T)) As ImmutableList(Of T)

Type Parameters

T

The type of items stored by the collection.

Parameters

items
ReadOnlySpan<T>

A span that contains the items to prepopulate the list with.

Returns

A new immutable list that contains the specified items.

Applies to

Create<T>(T)

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

Creates a new immutable list that contains the specified item.

public:
generic <typename T>
 static System::Collections::Immutable::ImmutableList<T> ^ Create(T item);
public static System.Collections.Immutable.ImmutableList<T> Create<T> (T item);
static member Create : 'T -> System.Collections.Immutable.ImmutableList<'T>
Public Function Create(Of T) (item As T) As ImmutableList(Of T)

Type Parameters

T

The type of items in the .

Parameters

item
T

The item to prepopulate the list with.

Returns

A new that contains the specified item.

Applies to

Create<T>(T[])

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

Creates a new immutable list that contains the specified array of items.

public:
generic <typename T>
 static System::Collections::Immutable::ImmutableList<T> ^ Create(... cli::array <T> ^ items);
public static System.Collections.Immutable.ImmutableList<T> Create<T> (params T[] items);
static member Create : 'T[] -> System.Collections.Immutable.ImmutableList<'T>
Public Function Create(Of T) (ParamArray items As T()) As ImmutableList(Of T)

Type Parameters

T

The type of items in the .

Parameters

items
T[]

An array that contains the items to prepopulate the list with.

Returns

A new immutable list that contains the specified items.

Applies to