Hi,
I implementation operator overloading in c#.
I overload '>=' . why i force implementation '<= ' . :(
The comparison operators, if overloaded, must be overloaded in pairs; that is, if== is overloaded, != must also be overloaded. The reverse is also true, and similar for< and >, and for<= and >=.
Why??????????????
Or
// Overloading '+' operator: public static ComplexNumber operator+(ComplexNumber a, ComplexNumber b) {return new ComplexNumber(a.real + b.real, a.imaginary + b.imaginary); }// Overloading '-' operator: public static ComplexNumber operator-(ComplexNumber a, ComplexNumber b) {return new ComplexNumber(a.real - b.real, a.imaginary - b.imaginary); }