Method TryGetElement

| MongoDB CSharp Driver API Reference (original) (raw)

Namespace

MongoDB.Bson

Assembly

MongoDB.Bson.dll

TryGetElement(string, out BsonElement)

Tries to get an element of this document.

public virtual bool TryGetElement(string name, out BsonElement value)

Parameters

name string

The name of the element.

value BsonElement

The element.

Returns

bool

True if an element with that name was found.