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