Method Set
| MongoDB CSharp Driver API Reference (original) (raw)
Namespace
Assembly
MongoDB.Bson.dll
Set(int, BsonValue)
Sets the value of an element.
public virtual BsonDocument Set(int index, BsonValue value)
Parameters
index
int
The zero based index of the element whose value is to be set.
value
BsonValue
The new value.
Returns
The document (so method calls can be chained).
Set(string, BsonValue)
Sets the value of an element (an element will be added if no element with this name is found).
public virtual BsonDocument Set(string name, BsonValue value)
Parameters
name
string
The name of the element whose value is to be set.
value
BsonValue
The new value.
Returns
The document (so method calls can be chained).