Click or drag to resize

RawBsonDocumentItem Property (String, BsonValue)

Note: This API is now obsolete.

Gets the value of an element or a default value if the element is not found.

Namespace:  MongoDB.Bson
Assembly:  MongoDB.Bson (in MongoDB.Bson.dll) Version: 2.6.0+Branch.origin/v2.6.x.Sha.593796a7b35dc59243383bcc684de296a5468f2e
Syntax
[ObsoleteAttribute("Use GetValue(string name, BsonValue defaultValue) instead.")]
public override BsonValue this[
	string name,
	BsonValue defaultValue
] { get; }

Parameters

name
Type: SystemString
The name of the element.
defaultValue
Type: MongoDB.BsonBsonValue
The default value to return if the element is not found.

Return Value

Type: BsonValue
Teh value of the element or a default value if the element is not found.
See Also