ImmutableArrayExtensions.All<T> 方法

定義

獲得一個值,表示該陣列中的所有元素是否符合給定條件。

public:
generic <typename T>
[System::Runtime::CompilerServices::Extension]
 static bool All(System::Collections::Immutable::ImmutableArray<T> immutableArray, Func<T, bool> ^ predicate);
public static bool All<T>(this System.Collections.Immutable.ImmutableArray<T> immutableArray, Func<T,bool> predicate);
static member All : System.Collections.Immutable.ImmutableArray<'T> * Func<'T, bool> -> bool
<Extension()>
Public Function All(Of T) (immutableArray As ImmutableArray(Of T), predicate As Func(Of T, Boolean)) As Boolean

類型參數

T

集合所包含的元素類型。

參數

immutableArray
ImmutableArray<T>

用來檢查匹配的陣列。

predicate
Func<T,Boolean>

謂詞。

傳回

true若來源序列中的每個元素都通過指定謂詞的測試;否則,。 false

適用於