ImmutableArrayExtensions.First メソッド

定義

オーバーロード

First<T>(ImmutableArray<T>)

配列内の最初の要素を返します。

First<T>(ImmutableArray<T>.Builder)

コレクション内の最初の要素を返します。

First<T>(ImmutableArray<T>, Func<T,Boolean>)

指定された条件を満たす、シーケンスの最初の要素を返します。

First<T>(ImmutableArray<T>)

配列内の最初の要素を返します。

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

型パラメーター

T

コレクションに含まれる要素の型。

パラメーター

immutableArray
ImmutableArray<T>

取得する項目が格納されている配列。

戻り値

T

配列内の最初の項目。

例外

配列が空の場合。

適用対象

First<T>(ImmutableArray<T>.Builder)

コレクション内の最初の要素を返します。

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

型パラメーター

T

配列内の項目の型。

パラメーター

builder
ImmutableArray<T>.Builder

取得する項目が含まれているビルダー。

戻り値

T

リスト内の最初の項目。

例外

配列が空の場合。

適用対象

First<T>(ImmutableArray<T>, Func<T,Boolean>)

指定された条件を満たす、シーケンスの最初の要素を返します。

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

型パラメーター

T

コレクションに含まれる要素の型。

パラメーター

immutableArray
ImmutableArray<T>

取得する項目が格納されている配列。

predicate
Func<T,Boolean>

検索する要素の条件を定義するデリゲート。

戻り値

T

predicate で指定された条件を満たしている場合は、リスト内の最初の項目。

例外

配列が空の場合。

適用対象