Table of Contents

Method Slice

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

Slice(string, int)

Adds a slice to be included in the results.

public FieldsBuilder Slice(string name, int size)

Parameters

name string

The name of the field to slice.

size int

The size of the slice (negative sizes are taken from the end).

Returns

FieldsBuilder

The builder (so method calls can be chained).

Slice(string, int, int)

Adds a slice to be included in the results.

public FieldsBuilder Slice(string name, int skip, int limit)

Parameters

name string

The name of the field to slice.

skip int

The number of values to skip.

limit int

The number of values to extract.

Returns

FieldsBuilder

The builder (so method calls can be chained).