/// <returns> true if the administration numbers are equal, false if not. The /// comparison is made on the integer parts of the administration number to avoid /// round-off problems that may have occurred in the floating point data. </returns> /// <param name="a"> Administration number to check. </param> public bool Equals(StateMod_AdministrationNumber a) { if ((a._fraction == _fraction) && (a._whole == _whole)) { return(true); } return(false); }
/// <returns> true if the current instance is less than "a". The /// comparison is made on the integer parts of the administration number to avoid /// round-off problems that may have occurred in the floating point data. </returns> /// <param name="a"> Administration number to check. </param> public bool lessThan(StateMod_AdministrationNumber a) { if (Equals(a)) { return(false); } if (greaterThan(a)) { return(false); } // Must be true... return(true); }
/// <returns> true if the current instance is greater than "a". The /// comparison is made on the integer parts of the administration number to avoid /// round-off problems that may have occurred in the floating point data. </returns> /// <param name="a"> Administration number to compare. </param> public bool greaterThan(StateMod_AdministrationNumber a) { if (_whole > a._whole) { // No need to check further return(true); } else if (_whole == a._whole) { // Check the remainder... if (_fraction > a._fraction) { // No need to check further return(true); } } // This instance is equal to or less than "a"... return(false); }