Finds the first item in the list that satisfies the condition
defined by predicate. If no item matches the condition, than
the default value for T (null or all-zero) is returned.
Namespace: X3Platform.CollectionsAssembly: X3Platform.Support (in X3Platform.Support.dll) Version: 1.0.0.0 (2.0.0.0)
Syntaxpublic virtual T Find(
Predicate<T> predicate
)
public:
virtual T Find(
Predicate<T>^ predicate
)
Parameters
- predicate
- Type: SystemPredicateT
A delegate that defined the condition to check for.
Return Value
Type:
TThe first item that satisfies the condition
predicate. If no item satisfies that
condition, the default value for T is returned.
RemarksIf the default value for T (null or all-zero) matches the condition defined by
predicate,
and the list might contain the default value, then it is impossible to distinguish the different between finding
the default value and not finding any item. To distinguish these cases, use
TryFind(PredicateT, T).
See Also