Wintellect.PowerCollections Namespace
Algorithms Class
Algorithms Methods
GhostDoc Pro Sample Help File

Algorithms..::..Exists<(Of <(<'T>)>)> Method

Determines if a collection contains any item that satisfies the condition defined by predicate.

Namespace:  Wintellect.PowerCollections
Assembly:  PowerCollections (in PowerCollections.dll)

Syntax


public static bool Exists<T>(
	IEnumerable<T> collection,
	Predicate<T> predicate
)
Public Shared Function Exists(Of T) ( _
	collection As IEnumerable(Of T), _
	predicate As Predicate(Of T) _
) As Boolean
public:
generic<typename T>
static bool^ Exists(
	IEnumerable<T>^ collection, 
	Predicate<T>^ predicate
)

Type Parameters

T

Parameters

collection
Type: IEnumerable<(Of <(<'T>)>)>
The collection to check all the items in.
predicate
Type: Predicate<(Of <(<'T>)>)>
A delegate that defines the condition to check for.

Return Value

True if the collection contains one or more items that satisfy the condition defined by predicate. False if the collection does not contain an item that satisfies predicate.