Operator explicit operator
explicit operator bool(BsonValue)
Casts a BsonValue to a bool.
public static explicit operator bool(BsonValue value)
Parameters
value
BsonValueThe BsonValue.
Returns
- bool
A bool.
explicit operator bool?(BsonValue)
Casts a BsonValue to a bool?.
public static explicit operator bool?(BsonValue value)
Parameters
value
BsonValueThe BsonValue.
Returns
- bool?
A bool?.
explicit operator byte[](BsonValue)
Casts a BsonValue to a byte[].
public static explicit operator byte[](BsonValue value)
Parameters
value
BsonValueThe BsonValue.
Returns
- byte[]
A byte[].
explicit operator DateTime(BsonValue)
Casts a BsonValue to a DateTime.
public static explicit operator DateTime(BsonValue value)
Parameters
value
BsonValueThe BsonValue.
Returns
- DateTime
A DateTime.
explicit operator DateTime?(BsonValue)
Casts a BsonValue to a DateTime?.
public static explicit operator DateTime?(BsonValue value)
Parameters
value
BsonValueThe BsonValue.
Returns
- DateTime?
A DateTime?.
explicit operator decimal(BsonValue)
Casts a BsonValue to a decimal.
public static explicit operator decimal(BsonValue value)
Parameters
value
BsonValueThe BsonValue.
Returns
- decimal
A decimal.
explicit operator decimal?(BsonValue)
Casts a BsonValue to a decimal?.
public static explicit operator decimal?(BsonValue value)
Parameters
value
BsonValueThe BsonValue.
Returns
- decimal?
A decimal?.
explicit operator Decimal128(BsonValue)
Casts a BsonValue to a Decimal128.
public static explicit operator Decimal128(BsonValue value)
Parameters
value
BsonValueThe BsonValue.
Returns
explicit operator Decimal128?(BsonValue)
Casts a BsonValue to a nullable Decimal128?.
public static explicit operator Decimal128?(BsonValue value)
Parameters
value
BsonValueThe 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
BsonValueThe BsonValue.
Returns
- double
A double.
explicit operator double?(BsonValue)
Casts a BsonValue to a double?.
public static explicit operator double?(BsonValue value)
Parameters
value
BsonValueThe BsonValue.
Returns
- double?
A double?.
explicit operator Guid(BsonValue)
Casts a BsonValue to a Guid.
public static explicit operator Guid(BsonValue value)
Parameters
value
BsonValueThe BsonValue.
Returns
- Guid
A Guid.
explicit operator Guid?(BsonValue)
Casts a BsonValue to a Guid?.
public static explicit operator Guid?(BsonValue value)
Parameters
value
BsonValueThe BsonValue.
Returns
- Guid?
A Guid?.
explicit operator int(BsonValue)
Casts a BsonValue to an int.
public static explicit operator int(BsonValue value)
Parameters
value
BsonValueThe BsonValue.
Returns
- int
An int.
explicit operator int?(BsonValue)
Casts a BsonValue to an int?.
public static explicit operator int?(BsonValue value)
Parameters
value
BsonValueThe BsonValue.
Returns
- int?
An int?.
explicit operator long(BsonValue)
Casts a BsonValue to a long.
public static explicit operator long(BsonValue value)
Parameters
value
BsonValueThe BsonValue.
Returns
- long
A long.
explicit operator long?(BsonValue)
Casts a BsonValue to a long?.
public static explicit operator long?(BsonValue value)
Parameters
value
BsonValueThe BsonValue.
Returns
- long?
A long?.
explicit operator ObjectId(BsonValue)
Casts a BsonValue to an ObjectId.
public static explicit operator ObjectId(BsonValue value)
Parameters
value
BsonValueThe BsonValue.
Returns
- ObjectId
An ObjectId.
explicit operator ObjectId?(BsonValue)
Casts a BsonValue to an ObjectId?.
public static explicit operator ObjectId?(BsonValue value)
Parameters
value
BsonValueThe BsonValue.
Returns
- ObjectId?
An ObjectId?.
explicit operator Regex(BsonValue)
Casts a BsonValue to a Regex.
public static explicit operator Regex(BsonValue value)
Parameters
value
BsonValueThe BsonValue.
Returns
- Regex
A Regex.
explicit operator string(BsonValue)
Casts a BsonValue to a string.
public static explicit operator string(BsonValue value)
Parameters
value
BsonValueThe BsonValue.
Returns
- string
A string.