Table of Contents

Class BsonDouble

Namespace
MongoDB.Bson
Assembly
MongoDB.Bson.dll

Represents a BSON double value.

[Serializable]
public class BsonDouble : BsonValue, IComparable<BsonValue>, IConvertible, IEquatable<BsonValue>, IComparable<BsonDouble>, IEquatable<BsonDouble>
Inheritance
BsonDouble
Implements
Inherited Members
Extension Methods

Constructors

BsonDouble(double)

Initializes a new instance of the BsonDouble class.

public BsonDouble(double value)

Parameters

value double

The value.

See Also

Properties

BsonType

Gets the BsonType of this BsonValue.

public override BsonType BsonType { get; }

Property Value

BsonType
See Also

RawValue

Gets the raw value of this BsonValue (or null if this BsonValue doesn't have a single scalar value).

[Obsolete("Use Value instead.")]
public override object RawValue { get; }

Property Value

object
See Also

Value

Gets the value of this BsonDouble.

public double Value { get; }

Property Value

double
See Also

Methods

CompareTo(BsonDouble)

Compares this BsonDouble to another BsonDouble.

public int CompareTo(BsonDouble other)

Parameters

other BsonDouble

The other BsonDouble.

Returns

int

A 32-bit signed integer that indicates whether this BsonDouble is less than, equal to, or greather than the other.

See Also

CompareTo(BsonValue)

Compares this BsonValue to another BsonValue.

public override int CompareTo(BsonValue other)

Parameters

other BsonValue

The other BsonValue.

Returns

int

A 32-bit signed integer that indicates whether this BsonValue is less than, equal to, or greather than the other BsonValue.

See Also

Create(object)

Creates a new instance of the BsonDouble class.

public static BsonDouble Create(object value)

Parameters

value object

An object to be mapped to a BsonDouble.

Returns

BsonDouble

A BsonDouble.

See Also

Equals(BsonDouble)

Compares this BsonDouble to another BsonDouble.

public bool Equals(BsonDouble rhs)

Parameters

rhs BsonDouble

The other BsonDouble.

Returns

bool

True if the two BsonDouble values are equal.

See Also

Equals(object)

Compares this BsonValue to another object.

public override bool Equals(object obj)

Parameters

obj object

The other object.

Returns

bool

True if the other object is a BsonValue and equal to this one.

See Also

GetHashCode()

Gets the hash code.

public override int GetHashCode()

Returns

int

The hash code.

See Also

IConvertibleGetTypeCodeImplementation()

Implementation of the IConvertible GetTypeCode method.

protected override TypeCode IConvertibleGetTypeCodeImplementation()

Returns

TypeCode

The TypeCode.

See Also

IConvertibleToBooleanImplementation(IFormatProvider)

Implementation of the IConvertible ToBoolean method.

protected override bool IConvertibleToBooleanImplementation(IFormatProvider provider)

Parameters

provider IFormatProvider

The format provider.

Returns

bool

A bool.

See Also

IConvertibleToByteImplementation(IFormatProvider)

Implementation of the IConvertible ToByte method.

protected override byte IConvertibleToByteImplementation(IFormatProvider provider)

Parameters

provider IFormatProvider

The format provider.

Returns

byte

A byte.

See Also

IConvertibleToDecimalImplementation(IFormatProvider)

Implementation of the IConvertible ToDecimal method.

protected override decimal IConvertibleToDecimalImplementation(IFormatProvider provider)

Parameters

provider IFormatProvider

The format provider.

Returns

decimal

A decimal.

See Also

IConvertibleToDoubleImplementation(IFormatProvider)

Implementation of the IConvertible ToDouble method.

protected override double IConvertibleToDoubleImplementation(IFormatProvider provider)

Parameters

provider IFormatProvider

The format provider.

Returns

double

A double.

See Also

IConvertibleToInt16Implementation(IFormatProvider)

Implementation of the IConvertible ToInt16 method.

protected override short IConvertibleToInt16Implementation(IFormatProvider provider)

Parameters

provider IFormatProvider

The format provider.

Returns

short

A short.

See Also

IConvertibleToInt32Implementation(IFormatProvider)

Implementation of the IConvertible ToInt32 method.

protected override int IConvertibleToInt32Implementation(IFormatProvider provider)

Parameters

provider IFormatProvider

The format provider.

Returns

int

An int.

See Also

IConvertibleToInt64Implementation(IFormatProvider)

Implementation of the IConvertible ToInt64 method.

protected override long IConvertibleToInt64Implementation(IFormatProvider provider)

Parameters

provider IFormatProvider

The format provider.

Returns

long

A long.

See Also

IConvertibleToSByteImplementation(IFormatProvider)

Implementation of the IConvertible ToSByte method.

protected override sbyte IConvertibleToSByteImplementation(IFormatProvider provider)

Parameters

provider IFormatProvider

The format provider.

Returns

sbyte

An sbyte.

See Also

IConvertibleToSingleImplementation(IFormatProvider)

Implementation of the IConvertible ToSingle method.

protected override float IConvertibleToSingleImplementation(IFormatProvider provider)

Parameters

provider IFormatProvider

The format provider.

Returns

float

A float.

See Also

IConvertibleToStringImplementation(IFormatProvider)

Implementation of the IConvertible ToString method.

protected override string IConvertibleToStringImplementation(IFormatProvider provider)

Parameters

provider IFormatProvider

The format provider.

Returns

string

A string.

See Also

IConvertibleToUInt16Implementation(IFormatProvider)

Implementation of the IConvertible ToUInt16 method.

protected override ushort IConvertibleToUInt16Implementation(IFormatProvider provider)

Parameters

provider IFormatProvider

The format provider.

Returns

ushort

A ushort.

See Also

IConvertibleToUInt32Implementation(IFormatProvider)

Implementation of the IConvertible ToUInt32 method.

protected override uint IConvertibleToUInt32Implementation(IFormatProvider provider)

Parameters

provider IFormatProvider

The format provider.

Returns

uint

A uint.

See Also

IConvertibleToUInt64Implementation(IFormatProvider)

Implementation of the IConvertible ToUInt64 method.

protected override ulong IConvertibleToUInt64Implementation(IFormatProvider provider)

Parameters

provider IFormatProvider

The format provider.

Returns

ulong

A ulong.

See Also

OperatorEqualsImplementation(BsonValue)

Implementation of operator ==.

protected override bool OperatorEqualsImplementation(BsonValue rhs)

Parameters

rhs BsonValue

The other BsonValue.

Returns

bool

True if the two BsonValues are equal according to ==.

See Also

ToBoolean()

Converts this BsonValue to a Boolean (using the JavaScript definition of truthiness).

public override bool ToBoolean()

Returns

bool

A Boolean.

See Also

ToDecimal()

Converts this BsonValue to a Decimal.

public override decimal ToDecimal()

Returns

decimal

A Decimal.

See Also

ToDecimal128()

Converts this BsonValue to a Decimal128.

public override Decimal128 ToDecimal128()

Returns

Decimal128

A Decimal128.

See Also

ToDouble()

Converts this BsonValue to a Double.

public override double ToDouble()

Returns

double

A Double.

See Also

ToInt32()

Converts this BsonValue to an Int32.

public override int ToInt32()

Returns

int

An Int32.

See Also

ToInt64()

Converts this BsonValue to an Int64.

public override long ToInt64()

Returns

long

An Int64.

See Also

ToString()

public override string ToString()

Returns

string
See Also

Operators

operator ==(BsonDouble, BsonDouble)

Compares two BsonDouble values.

public static bool operator ==(BsonDouble lhs, BsonDouble rhs)

Parameters

lhs BsonDouble

The first BsonDouble.

rhs BsonDouble

The other BsonDouble.

Returns

bool

True if the two BsonDouble values are equal according to ==.

See Also

implicit operator BsonDouble(double)

Converts a double to a BsonDouble.

public static implicit operator BsonDouble(double value)

Parameters

value double

A double.

Returns

BsonDouble

A BsonDouble.

See Also

operator !=(BsonDouble, BsonDouble)

Compares two BsonDouble values.

public static bool operator !=(BsonDouble lhs, BsonDouble rhs)

Parameters

lhs BsonDouble

The first BsonDouble.

rhs BsonDouble

The other BsonDouble.

Returns

bool

True if the two BsonDouble values are not equal according to ==.

See Also

See Also