Click or drag to resize
AlgorithmsTryFindFirstWhereT Method
Finds the first item in a collection that satisfies the condition defined by predicate.

Namespace: X3Platform.Collections
Assembly: X3Platform.Support (in X3Platform.Support.dll) Version: 1.0.0.0 (2.0.0.0)
Syntax
public static bool TryFindFirstWhere<T>(
	IEnumerable<T> collection,
	Predicate<T> predicate,
	out T foundItem
)

Parameters

collection
Type: System.Collections.GenericIEnumerableT
The collection to search.
predicate
Type: SystemPredicateT
A delegate that defined the condition to check for.
foundItem
Type: T
Outputs the first item in the collection that matches the condition, if the method returns true.

Type Parameters

T

[Missing <typeparam name="T"/> documentation for "M:X3Platform.Collections.Algorithms.TryFindFirstWhere``1(System.Collections.Generic.IEnumerable{``0},System.Predicate{``0},``0@)"]

Return Value

Type: Boolean
True if an item satisfying the condition was found. False if no such item exists in the collection.
See Also