Table of Contents

Method Inc

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

Inc(Expression<Func<TDocument, double>>, double)

Increments the named element by a value (see $inc).

public UpdateBuilder<TDocument> Inc(Expression<Func<TDocument, double>> memberExpression, double value)

Parameters

memberExpression Expression<Func<TDocument, double>>

The member expression.

value double

The value to increment by.

Returns

UpdateBuilder<TDocument>

The builder (so method calls can be chained).

Inc(Expression<Func<TDocument, int>>, int)

Increments the named element by a value (see $inc).

public UpdateBuilder<TDocument> Inc(Expression<Func<TDocument, int>> memberExpression, int value)

Parameters

memberExpression Expression<Func<TDocument, int>>

The member expression.

value int

The value to increment by.

Returns

UpdateBuilder<TDocument>

The builder (so method calls can be chained).

Inc(Expression<Func<TDocument, long>>, long)

Increments the named element by a value (see $inc).

public UpdateBuilder<TDocument> Inc(Expression<Func<TDocument, long>> memberExpression, long value)

Parameters

memberExpression Expression<Func<TDocument, long>>

The member expression.

value long

The value to increment by.

Returns

UpdateBuilder<TDocument>

The builder (so method calls can be chained).