Skip to content

ExtendedNumerics.BigDecimal.Equals(System.Nullable_ExtendedNumerics.BigDecimal_,System.Nullable_ExtendedNumerics.BigDecimal_,int)

Adam White edited this page Oct 7, 2024 · 1 revision

BigDecimal.Equals(Nullable, Nullable, int) Method

Determines if two instances of BigDecimal are equal, up to precision digits.
The precise behavior of this method depends on the value of AlwaysTruncate.
If AlwaysTruncate is true, then both arguments will first be rounded to precision or Precision decimal places,
which ever is smaller. Then they will be checked for equivalency.
If AlwaysTruncate is false, then this method will behave as expected.

public static bool Equals(System.Nullable<ExtendedNumerics.BigDecimal> left, System.Nullable<ExtendedNumerics.BigDecimal> right, int precision);

Parameters

left System.Nullable<BigDecimal>

right System.Nullable<BigDecimal>

precision System.Int32

The number of digits to the right of the decimal place to perform the comparison to. Any digitx beyond this, will be ignored.
Precision supercedes this parameter, if AlwaysTruncate is true.
If AlwaysTruncate is true and Precision is smaller than precision, then this parameter is effectively ignored.

Returns

System.Boolean
True if the two numbers are equal, up to precision.

Clone this wiki locally