Click or drag to resize

SetFieldDefinitionsBuilderTDocumentSetTField Method (ExpressionFuncTDocument, TField, TField)

Set a field to a value using an expression to specify the field and a constant to specify the value.

Namespace:  MongoDB.Driver
Assembly:  MongoDB.Driver (in MongoDB.Driver.dll) Version: 2.22.0+75246110ed1247226fcc7f8eb2c54ffab745693e
Syntax
public ListSetFieldDefinitions<TDocument> Set<TField>(
	Expression<Func<TDocument, TField>> field,
	TField value
)

Parameters

field
Type: System.Linq.ExpressionsExpressionFuncTDocument, TField
The field.
value
Type: TField
The value.

Type Parameters

TField
The type of the field.

Return Value

Type: ListSetFieldDefinitionsTDocument
An instance of ListSetFieldDefinitions to which further set field definitions can be added.
See Also