Table of Contents

Method TryMapToBsonValue

Namespace
MongoDB.Bson
Assembly
MongoDB.Bson.dll

TryMapToBsonValue(object, out BsonValue)

Tries to map an object to an instance of the closest BsonValue class.

public static bool TryMapToBsonValue(object value, out BsonValue bsonValue)

Parameters

value object

An object.

bsonValue BsonValue

The BsonValue.

Returns

bool

True if the mapping was successfull.