Table of Contents

Operator explicit operator

Namespace
MongoDB.Bson
Assembly
MongoDB.Bson.dll

explicit operator bool(BsonValue)

Casts a BsonValue to a bool.

public static explicit operator bool(BsonValue value)

Parameters

value BsonValue

The BsonValue.

Returns

bool

A bool.

explicit operator bool?(BsonValue)

Casts a BsonValue to a bool?.

public static explicit operator bool?(BsonValue value)

Parameters

value BsonValue

The BsonValue.

Returns

bool?

A bool?.

explicit operator byte[](BsonValue)

Casts a BsonValue to a byte[].

public static explicit operator byte[](BsonValue value)

Parameters

value BsonValue

The BsonValue.

Returns

byte[]

A byte[].

explicit operator DateTime(BsonValue)

Casts a BsonValue to a DateTime.

public static explicit operator DateTime(BsonValue value)

Parameters

value BsonValue

The BsonValue.

Returns

DateTime

A DateTime.

explicit operator DateTime?(BsonValue)

Casts a BsonValue to a DateTime?.

public static explicit operator DateTime?(BsonValue value)

Parameters

value BsonValue

The BsonValue.

Returns

DateTime?

A DateTime?.

explicit operator decimal(BsonValue)

Casts a BsonValue to a decimal.

public static explicit operator decimal(BsonValue value)

Parameters

value BsonValue

The BsonValue.

Returns

decimal

A decimal.

explicit operator decimal?(BsonValue)

Casts a BsonValue to a decimal?.

public static explicit operator decimal?(BsonValue value)

Parameters

value BsonValue

The BsonValue.

Returns

decimal?

A decimal?.

explicit operator Decimal128(BsonValue)

Casts a BsonValue to a Decimal128.

public static explicit operator Decimal128(BsonValue value)

Parameters

value BsonValue

The BsonValue.

Returns

Decimal128

A Decimal128.

explicit operator Decimal128?(BsonValue)

Casts a BsonValue to a nullable Decimal128?.

public static explicit operator Decimal128?(BsonValue value)

Parameters

value BsonValue

The BsonValue.

Returns

Decimal128?

A nullable Decimal128.

explicit operator double(BsonValue)

Casts a BsonValue to a double.

public static explicit operator double(BsonValue value)

Parameters

value BsonValue

The BsonValue.

Returns

double

A double.

explicit operator double?(BsonValue)

Casts a BsonValue to a double?.

public static explicit operator double?(BsonValue value)

Parameters

value BsonValue

The BsonValue.

Returns

double?

A double?.

explicit operator Guid(BsonValue)

Casts a BsonValue to a Guid.

public static explicit operator Guid(BsonValue value)

Parameters

value BsonValue

The BsonValue.

Returns

Guid

A Guid.

explicit operator Guid?(BsonValue)

Casts a BsonValue to a Guid?.

public static explicit operator Guid?(BsonValue value)

Parameters

value BsonValue

The BsonValue.

Returns

Guid?

A Guid?.

explicit operator int(BsonValue)

Casts a BsonValue to an int.

public static explicit operator int(BsonValue value)

Parameters

value BsonValue

The BsonValue.

Returns

int

An int.

explicit operator int?(BsonValue)

Casts a BsonValue to an int?.

public static explicit operator int?(BsonValue value)

Parameters

value BsonValue

The BsonValue.

Returns

int?

An int?.

explicit operator long(BsonValue)

Casts a BsonValue to a long.

public static explicit operator long(BsonValue value)

Parameters

value BsonValue

The BsonValue.

Returns

long

A long.

explicit operator long?(BsonValue)

Casts a BsonValue to a long?.

public static explicit operator long?(BsonValue value)

Parameters

value BsonValue

The BsonValue.

Returns

long?

A long?.

explicit operator ObjectId(BsonValue)

Casts a BsonValue to an ObjectId.

public static explicit operator ObjectId(BsonValue value)

Parameters

value BsonValue

The BsonValue.

Returns

ObjectId

An ObjectId.

explicit operator ObjectId?(BsonValue)

Casts a BsonValue to an ObjectId?.

public static explicit operator ObjectId?(BsonValue value)

Parameters

value BsonValue

The BsonValue.

Returns

ObjectId?

An ObjectId?.

explicit operator Regex(BsonValue)

Casts a BsonValue to a Regex.

public static explicit operator Regex(BsonValue value)

Parameters

value BsonValue

The BsonValue.

Returns

Regex

A Regex.

explicit operator string(BsonValue)

Casts a BsonValue to a string.

public static explicit operator string(BsonValue value)

Parameters

value BsonValue

The BsonValue.

Returns

string

A string.