public override bool Equals(object obj) { if (ReferenceEquals(null, obj)) { return(false); } if (ReferenceEquals(this, obj)) { return(true); } if (obj is string) { return(DeviceID.Equals(obj.ToString())); } return(obj is DeviceItem && Equals((DeviceItem)obj)); }
public bool Equals(ComDeviceInfo other) { return(DeviceID.Equals(other.DeviceID) && Name.Equals(other.Name) && Port.Equals(other.Port)); }