Table of Contents

Method SetFields

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

SetFields(IMongoFields)

Sets the fields that will be returned from the server.

public virtual MongoCursor SetFields(IMongoFields fields)

Parameters

fields IMongoFields

The fields that will be returned from the server.

Returns

MongoCursor

The cursor (so you can chain method calls to it).

SetFields(params string[])

Sets the fields that will be returned from the server.

public virtual MongoCursor SetFields(params string[] fields)

Parameters

fields string[]

The fields that will be returned from the server.

Returns

MongoCursor

The cursor (so you can chain method calls to it).