Table of Contents

Method Size

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

Size<TValue>(Expression<Func<TDocument, IEnumerable<TValue>>>, int)

Tests that the size of the named array is equal to some value (see $size).

public static IMongoQuery Size<TValue>(Expression<Func<TDocument, IEnumerable<TValue>>> memberExpression, int size)

Parameters

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

The member expression representing the element to test.

size int

The size to compare to.

Returns

IMongoQuery

An IMongoQuery.

Type Parameters

TValue

The type of the enumerable member values.