ImmutableArrayExtensions.Any 方法

定义

重载

Any<T>(ImmutableArray<T>)

获取一个值,该值指示数组是否包含任何元素。Gets a value indicating whether the array contains any elements.

Any<T>(ImmutableArray<T>)

返回一个值,该值指示此集合是否包含任何元素。Returns a value indicating whether this collection contains any elements.

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

获取一个值,该值指示数组是否包含与指定条件匹配的任何元素。Gets a value indicating whether the array contains any elements that match a specified condition.

Any<T>(ImmutableArray<T>)

获取一个值,该值指示数组是否包含任何元素。Gets a value indicating whether the array contains any elements.

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

类型参数

T

集合包含的元素的类型。The type of element contained by the collection.

参数

immutableArray
ImmutableArray<T>

要在其中检查元素的数组。The array to check for elements.

返回

如果数组包含元素,则为 true;否则为 falsetrue if the array contains an elements; otherwise, false.

Any<T>(ImmutableArray<T>)

返回一个值,该值指示此集合是否包含任何元素。Returns a value indicating whether this collection contains any elements.

public:
generic <typename T>
[System::Runtime::CompilerServices::Extension]
 static bool Any(System::Collections::Immutable::ImmutableArray<T>::Builder ^ builder);
public static bool Any<T> (this System.Collections.Immutable.ImmutableArray<T>.Builder builder);
static member Any : System.Collections.Immutable.ImmutableArray<'T>.Builder -> bool

类型参数

T

数组中元素的类型。The type of elements in the array.

参数

builder
ImmutableArray<T>.Builder

要在其中检查匹配项的生成器。The builder to check for matches.

返回

如果数组生成器包含任何元素,则为 true;否则为 falsetrue if the array builder contains any elements; otherwise, false.

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

获取一个值,该值指示数组是否包含与指定条件匹配的任何元素。Gets a value indicating whether the array contains any elements that match a specified condition.

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

类型参数

T

集合包含的元素的类型。The type of element contained by the collection.

参数

immutableArray
ImmutableArray<T>

要在其中检查元素的数组。The array to check for elements.

predicate
Func<T,Boolean>

用于定义匹配元素时要应用的条件的委托。The delegate that defines the condition to match to an element.

返回

如果某个元素与指定的条件匹配,则为 true;否则为 falsetrue if an element matches the specified condition; otherwise, false.

适用于