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