14.9.3 Decimal comparison operators

来源:互联网 发布:互联网商业模式知乎 编辑:程序博客网 时间:2024/06/05 01:14
The predefined decimal comparison operators are:
bool operator ==(decimal x, decimal y);
bool operator !=(decimal x, decimal y);
bool operator <(decimal x, decimal y);
bool operator >(decimal x, decimal y);
bool operator <=(decimal x, decimal y);
bool operator >=(decimal x, decimal y);
Each of these operators compares the numeric values of the two decimal
operands and returns a bool
value that indicates whether the particular relation is true or false. Each
decimal comparison is
equivalent to using the corresponding relational or equality operator of
type System.Decimal.