Exemplo n.º 1
0
 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));
 }
Exemplo n.º 2
0
 public bool Equals(ComDeviceInfo other)
 {
     return(DeviceID.Equals(other.DeviceID) &&
            Name.Equals(other.Name) &&
            Port.Equals(other.Port));
 }