/// <summary> /// Compares two instances of this object. /// </summary> /// <param name="MeterId1">A MeterId.</param> /// <param name="MeterId2">Another MeterId.</param> /// <returns>true|false</returns> public static Boolean operator >(Meter_Id MeterId1, Meter_Id MeterId2) { if ((Object)MeterId1 == null) { throw new ArgumentNullException("The given MeterId1 must not be null!"); } return(MeterId1.CompareTo(MeterId2) > 0); }
/// <summary> /// Compares two instances of this object. /// </summary> /// <param name="MeterId1">A MeterId.</param> /// <param name="MeterId2">Another MeterId.</param> /// <returns>true|false</returns> public static Boolean operator ==(Meter_Id MeterId1, Meter_Id MeterId2) { // If both are null, or both are same instance, return true. if (Object.ReferenceEquals(MeterId1, MeterId2)) { return(true); } // If one is null, but not both, return false. if (((Object)MeterId1 == null) || ((Object)MeterId2 == null)) { return(false); } return(MeterId1.Equals(MeterId2)); }