Table of Contents

Struct BigDecimal

Namespace
Apache.Ignite
Assembly
Apache.Ignite.dll

Big decimal.

Ignite supports values with up to MaxValue precision (in tables, SQL, Compute, and other APIs). .NET decimal has 28-29 digit precision and can not represent all values that Ignite supports. This type fills the gap.

public readonly record struct BigDecimal : IComparable<BigDecimal>, IComparable, IFormattable, IEquatable<BigDecimal>
Implements
Inherited Members

Constructors

BigDecimal(decimal)

Initializes a new instance of the BigDecimal struct.

public BigDecimal(decimal value)

Parameters

value decimal

Decimal value.

BigDecimal(BigInteger, short)

Initializes a new instance of the BigDecimal struct.

public BigDecimal(BigInteger unscaledValue, short scale)

Parameters

unscaledValue BigInteger

Unscaled value.

scale short

Scale.

Properties

Scale

Gets the scale.

public short Scale { get; }

Property Value

short

UnscaledValue

Gets the unscaled value.

public BigInteger UnscaledValue { get; }

Property Value

BigInteger

Methods

CompareTo(BigDecimal)

public int CompareTo(BigDecimal other)

Parameters

other BigDecimal

Returns

int

CompareTo(object?)

public int CompareTo(object? obj)

Parameters

obj object

Returns

int

ToDecimal()

Converts the value of this instance to its equivalent decimal representation.

public decimal ToDecimal()

Returns

decimal

Decimal representation of the current value.

Exceptions

OverflowException

Value was either too large or too small for a Decimal.

ToString()

public override string ToString()

Returns

string

ToString(IFormatProvider?)

Converts the numeric value of this object to its equivalent string representation.

public string ToString(IFormatProvider? provider)

Parameters

provider IFormatProvider

An object that supplies culture-specific formatting information.

Returns

string

The string representation of the current value.

ToString(string?, IFormatProvider?)

public string ToString(string? format, IFormatProvider? formatProvider)

Parameters

format string
formatProvider IFormatProvider

Returns

string

Operators

operator >(BigDecimal, BigDecimal)

public static bool operator >(BigDecimal left, BigDecimal right)

Parameters

left BigDecimal
right BigDecimal

Returns

bool

operator >=(BigDecimal, BigDecimal)

public static bool operator >=(BigDecimal left, BigDecimal right)

Parameters

left BigDecimal
right BigDecimal

Returns

bool

operator <(BigDecimal, BigDecimal)

public static bool operator <(BigDecimal left, BigDecimal right)

Parameters

left BigDecimal
right BigDecimal

Returns

bool

operator <=(BigDecimal, BigDecimal)

public static bool operator <=(BigDecimal left, BigDecimal right)

Parameters

left BigDecimal
right BigDecimal

Returns

bool