Table of Contents

Method FirstMatchingElement

Namespace
MongoDB.Driver.Linq
Assembly
MongoDB.Driver.dll

FirstMatchingElement<TSource>(IEnumerable<TSource>)

Represents the first matching element in an array used in a query (corresponds to the server's "$" update operator).

public static TSource FirstMatchingElement<TSource>(this IEnumerable<TSource> source)

Parameters

source IEnumerable<TSource>

A source of values.

Returns

TSource

Only meant to be used in Update specifications.

Type Parameters

TSource

The type of the elements of source.