Table of Contents

Method Limit

Namespace
MongoDB.Driver
Assembly
MongoDB.Driver.dll

Limit<TInput, TOutput>(PipelineDefinition<TInput, TOutput>, long)

Appends a $limit stage to the pipeline.

public static PipelineDefinition<TInput, TOutput> Limit<TInput, TOutput>(this PipelineDefinition<TInput, TOutput> pipeline, long limit)

Parameters

pipeline PipelineDefinition<TInput, TOutput>

The pipeline.

limit long

The limit.

Returns

PipelineDefinition<TInput, TOutput>

A new pipeline with an additional stage.

Type Parameters

TInput

The type of the input documents.

TOutput

The type of the output documents.