Table of Contents

Method Set

Namespace
MongoDB.Driver.Builders
Assembly
MongoDB.Driver.Legacy.dll

Set<TMember>(Expression<Func<TDocument, TMember>>, TMember)

Sets the value of the named element to a new value (see $set).

public UpdateBuilder<TDocument> Set<TMember>(Expression<Func<TDocument, TMember>> memberExpression, TMember value)

Parameters

memberExpression Expression<Func<TDocument, TMember>>

The member expression.

value TMember

The new value.

Returns

UpdateBuilder<TDocument>

The builder (so method calls can be chained).

Type Parameters

TMember

The type of the member.