Open sandboxFocus

Method Any

Any(IAttributeCollection)

Determines whether the attribute collection contains any elements.

Declaration
public static bool Any(this IAttributeCollection attributes)
Parameters
Type Name Description
IAttributeCollection attributes

The attribute collection to check.

Returns
Type Description
bool

true if the collection contains any elements; otherwise, false.

Any(IAttributeCollection, Func<IAttribute, bool>)

Determines whether any element of the attribute collection satisfies a condition.

Declaration
public static bool Any(this IAttributeCollection attributes, Func<IAttribute, bool> predicate)
Parameters
Type Name Description
IAttributeCollection attributes

The attribute collection to check.

Func<IAttribute, bool> predicate

A function to test each element for a condition.

Returns
Type Description
bool

true if any elements in the collection satisfy the condition; otherwise, false.