ImmutableArray.ToImmutableArray Metodo

Definizione

Overload

ToImmutableArray<TSource>(IEnumerable<TSource>)

Crea una matrice non modificabile dalla raccolta specificata.Creates an immutable array from the specified collection.

ToImmutableArray<TSource>(ImmutableArray<TSource>.Builder)

Crea una matrice non modificabile dal contenuto corrente della matrice del generatore.Creates an immutable array from the current contents of the builder's array.

ToImmutableArray<TSource>(IEnumerable<TSource>)

Crea una matrice non modificabile dalla raccolta specificata.Creates an immutable array from the specified collection.

public:
generic <typename TSource>
[System::Runtime::CompilerServices::Extension]
 static System::Collections::Immutable::ImmutableArray<TSource> ToImmutableArray(System::Collections::Generic::IEnumerable<TSource> ^ items);
public static System.Collections.Immutable.ImmutableArray<TSource> ToImmutableArray<TSource> (this System.Collections.Generic.IEnumerable<TSource> items);
public static System.Collections.Immutable.ImmutableArray<TSource>? ToImmutableArray<TSource> (this System.Collections.Generic.IEnumerable<TSource> items);
static member ToImmutableArray : seq<'Source> -> System.Collections.Immutable.ImmutableArray<'Source>
<Extension()>
Public Function ToImmutableArray(Of TSource) (items As IEnumerable(Of TSource)) As ImmutableArray(Of TSource)

Parametri di tipo

TSource

Tipo di elementi contenuti in items.The type of elements contained in items.

Parametri

items
IEnumerable<TSource>

Raccolta di oggetti da copiare nella matrice non modificabile.The collection of objects to copy to the immutable array.

Restituisce

ImmutableArray<TSource>

Matrice non modificabile che contiene la raccolta di oggetti specificata.An immutable array that contains the specified collection of objects.

Si applica a

Prodotto Introduced

ToImmutableArray<TSource>(ImmutableArray<TSource>.Builder)

Crea una matrice non modificabile dal contenuto corrente della matrice del generatore.Creates an immutable array from the current contents of the builder's array.

public:
generic <typename TSource>
[System::Runtime::CompilerServices::Extension]
 static System::Collections::Immutable::ImmutableArray<TSource> ToImmutableArray(System::Collections::Immutable::ImmutableArray<TSource>::Builder ^ builder);
public static System.Collections.Immutable.ImmutableArray<TSource>? ToImmutableArray<TSource> (this System.Collections.Immutable.ImmutableArray<TSource>.Builder builder);
public static System.Collections.Immutable.ImmutableArray<TSource> ToImmutableArray<TSource> (this System.Collections.Immutable.ImmutableArray<TSource>.Builder builder);
static member ToImmutableArray : System.Collections.Immutable.ImmutableArray<'Source>.Builder -> System.Collections.Immutable.ImmutableArray<'Source>
<Extension()>
Public Function ToImmutableArray(Of TSource) (builder As ImmutableArray(Of TSource).Builder) As ImmutableArray(Of TSource)

Parametri di tipo

TSource

Tipo di elementi contenuti nella matrice non modificabile.The type of elements contained in the immutable array.

Parametri

builder
ImmutableArray<TSource>.Builder

Generatore da cui creare la matrice non modificabile.The builder to create the immutable array from.

Restituisce

ImmutableArray<TSource>

Restituisce una matrice non modificabile che contiene il contenuto corrente della matrice del generatore.An immutable array that contains the current contents of the builder's array.

Si applica a

Prodotto Introduced