CSMongo.Query.MongoQuery.Increment C# (CSharp) Method

Increment() public method

Increments each of the fields provided by one
public Increment ( ) : void
return void
        public void Increment(params string[] fields)
        {
            //create the document
            BsonDocument document = new BsonDocument();
            foreach (string field in fields) {
                document.Set<int>(field, 1);
            }

            //send the command
            this.Increment(document);
        }

Same methods

MongoQuery::Increment ( BsonDocument document ) : void
MongoQuery::Increment ( object parameters ) : void