Table of Contents

Property this

Namespace
MongoDB.Bson
Assembly
MongoDB.Bson.dll

this[int]

Gets or sets a value by position.

public override BsonValue this[int index] { get; set; }

Parameters

index int

The position.

Property Value

BsonValue

The value.

this[string, BsonValue]

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

[Obsolete("Use GetValue(string name, BsonValue defaultValue) instead.")]
public virtual BsonValue this[string name, BsonValue defaultValue] { get; }

Parameters

name string

The name of the element.

defaultValue BsonValue

The default value to return if the element is not found.

Property Value

BsonValue

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

this[string]

Gets or sets a value by name.

public override BsonValue this[string name] { get; set; }

Parameters

name string

The name.

Property Value

BsonValue

The value.