Пример #1
0
 public override int GetHashCode()
 {
     unchecked
     {
         int hashCode = (Name != null ? Name.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ Price;
         hashCode = (hashCode * 397) ^ CanBuy.GetHashCode();
         return(hashCode);
     }
 }
Пример #2
0
 public bool Equals(JuiceStockData other)
 {
     if (ReferenceEquals(null, other))
     {
         return(false);
     }
     if (ReferenceEquals(this, other))
     {
         return(true);
     }
     return(string.Equals(Name, other.Name) && Price == other.Price && CanBuy.Equals(other.CanBuy));
 }