Expand Minimize

QueryBuilder.Find<'T,'Q> Method (F#)

A query operator that selects the first element selected so far that satisfies a specified condition.

Namespace/Module Path: Microsoft.FSharp.Linq

Assembly: FSharp.Core (in FSharp.Core.dll)

// Signature:
member this.Find : QuerySource<'T,'Q> * ('T -> bool) -> 'T

// Usage:
queryBuilder.Find (source, predicate)

source

Type: QuerySource<'T,'Q>

The input query.

predicate

Type: 'T -> bool

A function that tests each element.

Exception

Condition

InvalidOperationException

Thrown when no element returns true when evaluated by the predicate.

The first element for which the Boolean function predicate returns true.

For more information and examples, see Query Expressions (F#).

Windows 8, Windows 7, Windows Server 2012, Windows Server 2008 R2

F# Core Library Versions

Supported in: 4.0, Portable

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft