Table of Contents

Method Mod

Namespace
MongoDB.Driver
Assembly
MongoDB.Driver.dll

Mod(FieldDefinition<TDocument>, long, long)

Creates a modulo filter.

public FilterDefinition<TDocument> Mod(FieldDefinition<TDocument> field, long modulus, long remainder)

Parameters

field FieldDefinition<TDocument>

The field.

modulus long

The modulus.

remainder long

The remainder.

Returns

FilterDefinition<TDocument>

A modulo filter.

Mod(Expression<Func<TDocument, object>>, long, long)

Creates a modulo filter.

public FilterDefinition<TDocument> Mod(Expression<Func<TDocument, object>> field, long modulus, long remainder)

Parameters

field Expression<Func<TDocument, object>>

The field.

modulus long

The modulus.

remainder long

The remainder.

Returns

FilterDefinition<TDocument>

A modulo filter.