Compare()

Decimal::Compare(const Decimal&, const Decimal&) method

Determines if the value represented by the first Decimal object is less than, equal to or greater than the value represented by the second Decimal object.

static int System::Decimal::Compare(const Decimal &d1, const Decimal &d2)

Arguments

ParameterTypeDescription
d1const Decimal&The first comparand
d2const Decimal&The second comparand

Return Value

-1 if the value represented by d1 is less than the value represented by d2; 0 if the values are equal; 1 if the value represented by d1 is greater than the value represented by d2

See Also