System::Decimal::Compare 方法

Decimal::Compare method

确定由第一个 Decimal 对象表示的值是否小于、等于或大于由第二个 Decimal 对象表示的值。

static int System::Decimal::Compare(const Decimal &d1, const Decimal &d2)
参数类型描述
d1const Decimal&第一个比较数
d2const Decimal&第二个比较数

ReturnValue

-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

另见