ImmutableArrayExtensions.First Método
Definição
Sobrecargas
| First<T>(ImmutableArray<T>) |
Retorna o primeiro elemento em uma matriz.Returns the first element in an array. |
| First<T>(ImmutableArray<T>.Builder) |
Retorna o primeiro elemento na coleção.Returns the first element in the collection. |
| First<T>(ImmutableArray<T>, Func<T,Boolean>) |
Retorna o primeiro elemento em uma sequência que satisfaz uma condição especificada.Returns the first element in a sequence that satisfies a specified condition. |
First<T>(ImmutableArray<T>)
Retorna o primeiro elemento em uma matriz.Returns the first element in an array.
public:
generic <typename T>
[System::Runtime::CompilerServices::Extension]
static T First(System::Collections::Immutable::ImmutableArray<T> immutableArray);
public static T First<T> (this System.Collections.Immutable.ImmutableArray<T> immutableArray);
static member First : System.Collections.Immutable.ImmutableArray<'T> -> 'T
<Extension()>
Public Function First(Of T) (immutableArray As ImmutableArray(Of T)) As T
Parâmetros de tipo
- T
O tipo de elemento contido na coleção.The type of element contained by the collection.
Parâmetros
- immutableArray
- ImmutableArray<T>
A matriz da qual obter um item.The array to get an item from.
Retornos
- T
O primeiro item na matriz.The first item in the array.
Exceções
Se a matriz está vazia.If the array is empty.
Aplica-se a
First<T>(ImmutableArray<T>.Builder)
Retorna o primeiro elemento na coleção.Returns the first element in the collection.
public:
generic <typename T>
[System::Runtime::CompilerServices::Extension]
static T First(System::Collections::Immutable::ImmutableArray<T>::Builder ^ builder);
public static T First<T> (this System.Collections.Immutable.ImmutableArray<T>.Builder builder);
static member First : System.Collections.Immutable.ImmutableArray<'T>.Builder -> 'T
<Extension()>
Public Function First(Of T) (builder As ImmutableArray(Of T).Builder) As T
Parâmetros de tipo
- T
O tipo de itens na matriz.The type of items in the array.
Parâmetros
- builder
- ImmutableArray<T>.Builder
O construtor do qual recuperar um item.The builder to retrieve an item from.
Retornos
- T
O primeiro item na lista.The first item in the list.
Exceções
Se a matriz está vazia.If the array is empty.
Aplica-se a
First<T>(ImmutableArray<T>, Func<T,Boolean>)
Retorna o primeiro elemento em uma sequência que satisfaz uma condição especificada.Returns the first element in a sequence that satisfies a specified condition.
public:
generic <typename T>
[System::Runtime::CompilerServices::Extension]
static T First(System::Collections::Immutable::ImmutableArray<T> immutableArray, Func<T, bool> ^ predicate);
public static T First<T> (this System.Collections.Immutable.ImmutableArray<T> immutableArray, Func<T,bool> predicate);
static member First : System.Collections.Immutable.ImmutableArray<'T> * Func<'T, bool> -> 'T
<Extension()>
Public Function First(Of T) (immutableArray As ImmutableArray(Of T), predicate As Func(Of T, Boolean)) As T
Parâmetros de tipo
- T
O tipo de elemento contido na coleção.The type of element contained by the collection.
Parâmetros
- immutableArray
- ImmutableArray<T>
A matriz da qual obter um item.The array to get an item from.
O delegado que define as condições do elemento a ser pesquisado.The delegate that defines the conditions of the element to search for.
Retornos
- T
O primeiro item na lista se ele atende à condição especificada por predicate.The first item in the list if it meets the condition specified by predicate.
Exceções
Se a matriz está vazia.If the array is empty.