Saturday 19 May 2012

Decimal comparison operators


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.
Lifted (§14.2.7) forms of the unlifted predefined decimal comparison operators defined above are also predefined.

No comments:

Post a Comment