ImmutableArray.Create Método
Definição
Sobrecargas
| Create<T>(T, T, T, T) |
Cria uma matriz imutável que contém os objetos especificados.Creates an immutable array that contains the specified objects. |
| Create<T>(T, T, T) |
Cria uma matriz imutável que contém os objetos especificados.Creates an immutable array that contains the specified objects. |
| Create<T>(ImmutableArray<T>, Int32, Int32) |
Cria uma matriz imutável com os objetos especificados de outra matriz imutável.Creates an immutable array with the specified objects from another immutable array. |
| Create<T>(T[], Int32, Int32) |
Cria uma matriz imutável com objetos especificados de outra matriz.Creates an immutable array with specified objects from another array. |
| Create<T>(T[]) |
Cria uma matriz imutável com base na matriz de objetos especificada.Creates an immutable array from the specified array of objects. |
| Create<T>(T) |
Cria uma matriz imutável que contém o objeto especificado.Creates an immutable array that contains the specified object. |
| Create<T>() |
Cria uma matriz imutável vazia.Creates an empty immutable array. |
| Create<T>(T, T) |
Cria uma matriz imutável que contém os objetos especificados.Creates an immutable array that contains the specified objects. |
Create<T>(T, T, T, T)
Cria uma matriz imutável que contém os objetos especificados.Creates an immutable array that contains the specified objects.
public:
generic <typename T>
static System::Collections::Immutable::ImmutableArray<T> Create(T item1, T item2, T item3, T item4);
public static System.Collections.Immutable.ImmutableArray<T> Create<T> (T item1, T item2, T item3, T item4);
static member Create : 'T * 'T * 'T * 'T -> System.Collections.Immutable.ImmutableArray<'T>
Public Function Create(Of T) (item1 As T, item2 As T, item3 As T, item4 As T) As ImmutableArray(Of T)
Parâmetros de tipo
- T
O tipo de elementos armazenados na matriz.The type of elements stored in the array.
Parâmetros
- item1
- T
O primeiro objeto a ser armazenado na matriz.The first object to store in the array.
- item2
- T
O segundo objeto a ser armazenado na matriz.The second object to store in the array.
- item3
- T
O terceiro objeto a ser armazenado na matriz.The third object to store in the array.
- item4
- T
O quarto objeto a ser armazenado na matriz.The fourth object to store in the array.
Retornos
Uma matriz imutável que contém os objetos especificados.An immutable array that contains the specified objects.
Aplica-se a
Create<T>(T, T, T)
Cria uma matriz imutável que contém os objetos especificados.Creates an immutable array that contains the specified objects.
public:
generic <typename T>
static System::Collections::Immutable::ImmutableArray<T> Create(T item1, T item2, T item3);
public static System.Collections.Immutable.ImmutableArray<T> Create<T> (T item1, T item2, T item3);
static member Create : 'T * 'T * 'T -> System.Collections.Immutable.ImmutableArray<'T>
Public Function Create(Of T) (item1 As T, item2 As T, item3 As T) As ImmutableArray(Of T)
Parâmetros de tipo
- T
O tipo de elementos armazenados na matriz.The type of elements stored in the array.
Parâmetros
- item1
- T
O primeiro objeto a ser armazenado na matriz.The first object to store in the array.
- item2
- T
O segundo objeto a ser armazenado na matriz.The second object to store in the array.
- item3
- T
O terceiro objeto a ser armazenado na matriz.The third object to store in the array.
Retornos
Uma matriz imutável que contém os objetos especificados.An immutable array that contains the specified objects.
Aplica-se a
Create<T>(ImmutableArray<T>, Int32, Int32)
Cria uma matriz imutável com os objetos especificados de outra matriz imutável.Creates an immutable array with the specified objects from another immutable array.
public:
generic <typename T>
static System::Collections::Immutable::ImmutableArray<T> Create(System::Collections::Immutable::ImmutableArray<T> items, int start, int length);
public static System.Collections.Immutable.ImmutableArray<T> Create<T> (System.Collections.Immutable.ImmutableArray<T> items, int start, int length);
static member Create : System.Collections.Immutable.ImmutableArray<'T> * int * int -> System.Collections.Immutable.ImmutableArray<'T>
Public Function Create(Of T) (items As ImmutableArray(Of T), start As Integer, length As Integer) As ImmutableArray(Of T)
Parâmetros de tipo
- T
O tipo de elementos armazenados na matriz.The type of elements stored in the array.
Parâmetros
- items
- ImmutableArray<T>
A matriz de origem dos objetos.The source array of objects.
- start
- Int32
O índice do primeiro elemento a ser copiado de items.The index of the first element to copy from items.
- length
- Int32
O número de elementos de items a ser incluído nessa matriz imutável.The number of elements from items to include in this immutable array.
Retornos
Uma matriz imutável que contém os objetos especificados da matriz de origem.An immutable array that contains the specified objects from the source array.
Comentários
Essa sobrecarga permite que os métodos auxiliares ou classes de construtor personalizado evitem efetivamente pagar um imposto redundante para copiar uma matriz quando a nova matriz é um segmento de uma matriz existente.This overload allows helper methods or custom builder classes to efficiently avoid paying a redundant tax for copying an array when the new array is a segment of an existing array.
Aplica-se a
Create<T>(T[], Int32, Int32)
Cria uma matriz imutável com objetos especificados de outra matriz.Creates an immutable array with specified objects from another array.
public:
generic <typename T>
static System::Collections::Immutable::ImmutableArray<T> Create(cli::array <T> ^ items, int start, int length);
public static System.Collections.Immutable.ImmutableArray<T> Create<T> (T[] items, int start, int length);
static member Create : 'T[] * int * int -> System.Collections.Immutable.ImmutableArray<'T>
Public Function Create(Of T) (items As T(), start As Integer, length As Integer) As ImmutableArray(Of T)
Parâmetros de tipo
- T
O tipo de elementos armazenados na matriz.The type of elements stored in the array.
Parâmetros
- items
- T[]
A matriz de origem dos objetos.The source array of objects.
- start
- Int32
O índice do primeiro elemento a ser copiado de items.The index of the first element to copy from items.
- length
- Int32
O número de elementos de items a ser incluído nessa matriz imutável.The number of elements from items to include in this immutable array.
Retornos
Uma matriz imutável que contém os objetos especificados da matriz de origem.An immutable array that contains the specified objects from the source array.
Comentários
Essa sobrecarga permite que os métodos auxiliares ou classes de construtor personalizado evitem efetivamente pagar um imposto redundante para copiar uma matriz quando a nova matriz é um segmento de uma matriz existente.This overload allows helper methods or custom builder classes to efficiently avoid paying a redundant tax for copying an array when the new array is a segment of an existing array.
Aplica-se a
Create<T>(T[])
Cria uma matriz imutável com base na matriz de objetos especificada.Creates an immutable array from the specified array of objects.
public:
generic <typename T>
static System::Collections::Immutable::ImmutableArray<T> Create(... cli::array <T> ^ items);
public static System.Collections.Immutable.ImmutableArray<T> Create<T> (params T[] items);
public static System.Collections.Immutable.ImmutableArray<T> Create<T> (params T[]? items);
static member Create : 'T[] -> System.Collections.Immutable.ImmutableArray<'T>
Public Function Create(Of T) (ParamArray items As T()) As ImmutableArray(Of T)
Parâmetros de tipo
- T
O tipo de elementos armazenados na matriz.The type of elements stored in the array.
Parâmetros
- items
- T[]
A matriz de objetos com os quais preencher a matriz.The array of objects to populate the array with.
Retornos
Uma matriz imutável que contém a matriz de itens.An immutable array that contains the array of items.
Aplica-se a
Create<T>(T)
Cria uma matriz imutável que contém o objeto especificado.Creates an immutable array that contains the specified object.
public:
generic <typename T>
static System::Collections::Immutable::ImmutableArray<T> Create(T item);
public static System.Collections.Immutable.ImmutableArray<T> Create<T> (T item);
static member Create : 'T -> System.Collections.Immutable.ImmutableArray<'T>
Public Function Create(Of T) (item As T) As ImmutableArray(Of T)
Parâmetros de tipo
- T
O tipo de elementos armazenados na matriz.The type of elements stored in the array.
Parâmetros
- item
- T
O objeto a ser armazenado na matriz.The object to store in the array.
Retornos
Uma matriz imutável que contém o objeto especificado.An immutable array that contains the specified object.
Aplica-se a
Create<T>()
Cria uma matriz imutável vazia.Creates an empty immutable array.
public:
generic <typename T>
static System::Collections::Immutable::ImmutableArray<T> Create();
public static System.Collections.Immutable.ImmutableArray<T> Create<T> ();
static member Create : unit -> System.Collections.Immutable.ImmutableArray<'T>
Public Function Create(Of T) () As ImmutableArray(Of T)
Parâmetros de tipo
- T
O tipo de elementos armazenados na matriz.The type of elements stored in the array.
Retornos
Uma matriz imutável vazia.An empty immutable array.
Aplica-se a
Create<T>(T, T)
Cria uma matriz imutável que contém os objetos especificados.Creates an immutable array that contains the specified objects.
public:
generic <typename T>
static System::Collections::Immutable::ImmutableArray<T> Create(T item1, T item2);
public static System.Collections.Immutable.ImmutableArray<T> Create<T> (T item1, T item2);
static member Create : 'T * 'T -> System.Collections.Immutable.ImmutableArray<'T>
Public Function Create(Of T) (item1 As T, item2 As T) As ImmutableArray(Of T)
Parâmetros de tipo
- T
O tipo de elementos armazenados na matriz.The type of elements stored in the array.
Parâmetros
- item1
- T
O primeiro objeto a ser armazenado na matriz.The first object to store in the array.
- item2
- T
O segundo objeto a ser armazenado na matriz.The second object to store in the array.
Retornos
Uma matriz imutável que contém os objetos especificados.An immutable array that contains the specified objects.