Table of Contents

Class BsonDecimal128

Namespace
MongoDB.Bson
Assembly
MongoDB.Bson.dll

Represents a BSON Decimal128 value.

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

Constructors

BsonDecimal128(Decimal128)

Initializes a new instance of the BsonDecimal128 class.

public BsonDecimal128(Decimal128 value)

Parameters

value Decimal128

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.

public Decimal128 Value { get; }

Property Value

Decimal128
See Also

Methods

CompareTo(BsonDecimal128)

Compares this BsonDecimal128 to another BsonDecimal128.

public int CompareTo(BsonDecimal128 other)

Parameters

other BsonDecimal128

The other BsonDecimal128.

Returns

int

A 32-bit signed integer that indicates whether this BsonDecimal128 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 BsonDecimal128 class.

public static BsonDecimal128 Create(object value)

Parameters

value object

An object to be mapped to a BsonDecimal128.

Returns

BsonDecimal128

A BsonDecimal128.

See Also

Equals(BsonDecimal128)

Compares this BsonDecimal128 to another BsonDecimal128.

public bool Equals(BsonDecimal128 rhs)

Parameters

rhs BsonDecimal128

The other BsonDecimal128.

Returns

bool

True if the two BsonDecimal128 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 ==(BsonDecimal128, BsonDecimal128)

Compares two BsonDecimal128 values.

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

Parameters

lhs BsonDecimal128

The first BsonDecimal128.

rhs BsonDecimal128

The other BsonDecimal128.

Returns

bool

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

See Also

implicit operator BsonDecimal128(Decimal128)

Converts a Decimal128 to a BsonDecimal128.

public static implicit operator BsonDecimal128(Decimal128 value)

Parameters

value Decimal128

A Decimal128.

Returns

BsonDecimal128

A BsonDecimal128.

See Also

operator !=(BsonDecimal128, BsonDecimal128)

Compares two BsonDecimal128 values.

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

Parameters

lhs BsonDecimal128

The first BsonDecimal128.

rhs BsonDecimal128

The other BsonDecimal128.

Returns

bool

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

See Also

See Also