Table of contents
TOC
Collapse the table of content
Expand the table of content

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

Den Delimarsky|Last Updated: 8/18/2017
|
1 Contributor

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)

Syntax

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

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

Parameters

source Type: QuerySource<'T,'Q>

The input query.

predicate Type: 'T -> bool

A function that tests each element.

Exceptions

ExceptionCondition
InvalidOperationExceptionThrown when no element returns true when evaluated by the predicate.

Return Value

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

Remarks

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

Platforms

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

Version Information

F# Core Library Versions

Supported in: 4.0, Portable

See Also

Linq.QueryBuilder Class (F#)

Microsoft.FSharp.Linq Namespace (F#)

Query Expressions (F#)

© 2018 Microsoft