Table of Contents

Method Mod

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

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

Tests that the modulus of the value of the named element matches some value (see $mod).

public static IMongoQuery Mod(Expression<Func<TDocument, int>> memberExpression, long modulus, long value)

Parameters

memberExpression Expression<Func<TDocument, int>>

The member expression representing the element to test.

modulus long

The modulus.

value long

The value.

Returns

IMongoQuery

An IMongoQuery.

Mod(Expression<Func<TDocument, IEnumerable<int>>>, long, long)

Tests that the any of the values in the named array element match some value (see $mod).

public static IMongoQuery Mod(Expression<Func<TDocument, IEnumerable<int>>> memberExpression, long modulus, long value)

Parameters

memberExpression Expression<Func<TDocument, IEnumerable<int>>>

The member expression representing the element to test.

modulus long

The modulus.

value long

The value.

Returns

IMongoQuery

An IMongoQuery.