Click or drag to resize

BsonDocument.SetElement Method (Int32, BsonElement)

Sets an element of the document (replacing the existing element at that position).

Namespace:  MongoDB.Bson
Assembly:  MongoDB.Bson (in MongoDB.Bson.dll) Version: 2.10.0+569905ff5e778c38ea19d9d0392496a83e1704ed
Syntax
public virtual BsonDocument SetElement(
	int index,
	BsonElement element
)

Parameters

index
Type: System.Int32
The zero based index of the element to replace.
element
Type: MongoDB.Bson.BsonElement
The new element.

Return Value

Type: BsonDocument
The document.
See Also