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<TDocument> SetFields(IMongoFields fields)

Parameters

fields IMongoFields

The fields that will be returned from the server.

Returns

MongoCursor<TDocument>

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<TDocument> SetFields(params string[] fields)

Parameters

fields string[]

The fields that will be returned from the server.

Returns

MongoCursor<TDocument>

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