HBigDecimal Struct
Namespace: Hazelcast.Models
Assembly: Hazelcast.Net.dll
Represents an Hazelcast DECIMAL primitive type value.
public readonly struct HBigDecimal : IEquatable<HBigDecimal>
Implements
Inherited Members
Remarks
The DECIMAL primitive type consists of a random precision BigInteger
UnscaledValue and a int Scale which indicates the
number of digits of UnscaledValue that should be to the right of the decimal
point.
The actual value is therefore UnscaledValue*(10^-Scale).
Different combinations of (UnscaledValue, Scale) may represent the same
HBigDecimal number. Use the Normalize() method to get the unique
normalized representation of the number.
Corresponds to Java java.math.BigDecimal.
Constructors
| Name | Description |
|---|---|
| HBigDecimal(decimal) | Initializes a new instance of the HBigDecimal struct. |
| HBigDecimal(int) | Initializes a new instance of the HBigDecimal struct. |
| HBigDecimal(BigInteger, int) | Initializes a new instance of the HBigDecimal struct. |
Fields
| Name | Description |
|---|---|
| MinusOne | Gets a value that represents the number -1 (minus one). |
| One | Gets a value that represents the number 1 (one). |
| Ten | Gets a value that represents the number 10 (ten). |
| Zero | Gets a value that represents the number 0 (zero). |
Properties
| Name | Description |
|---|---|
| Scale | Gets the scale part of the number. |
| UnscaledValue | Gets the unscaled value part of the number. |
Methods
| Name | Description |
|---|---|
| Equals(HBigDecimal) | Indicates whether the current object is equal to another object of the same type. |
| Equals(object?) | Indicates whether this instance and a specified object are equal. |
| GetHashCode() | Returns the hash code for this instance. |
| Normalize() | Returns equivalent HBigDecimal value but with Scale guaranteed to be non-negative. |
| Parse(string) | Converts the string representation of a number to its HBigDecimal equivalent. |
| Parse(string, CultureInfo) | Converts the string representation of a number to its HBigDecimal equivalent. |
| ToDecimal() | Converts the numeric value of this instance to its equivalent decimal representation. |
| ToString() | Returns the fully qualified type name of this instance. |
| ToString(CultureInfo) | Converts the numeric value of this instance to its equivalent string representation. |
| TryParse(string, out HBigDecimal) | Converts the string representation of a number to its HBigDecimal equivalent. A return value indicates whether the operation succeeded. |
| TryParse(string?, CultureInfo, out HBigDecimal) | Converts the string representation of a number to its HBigDecimal equivalent. A return value indicates whether the operation succeeded. |
| TryToDecimal(out decimal) | Converts the numeric value of this instance to its equivalent decimal representation. A return value indicates whether the operation succeeded. |
Operators
| Name | Description |
|---|---|
| operator ==(HBigDecimal, HBigDecimal) | Implements the == operator. |
| explicit operator decimal(HBigDecimal) | Implements the HBigDecimal to decimal conversion. |
| explicit operator HBigDecimal(decimal) | Implements the decimal to HBigDecimal conversion. |
| operator !=(HBigDecimal, HBigDecimal) | Implements the != operator. |