Exemplo n.º 1
0
 /// <summary>
 /// Gets the hash code
 /// </summary>
 /// <returns>Hash code</returns>
 public override int GetHashCode()
 {
     unchecked // Overflow is fine, just wrap
     {
         var hashCode = 41;
         // Suitable nullity checks etc, of course :)
         if (Ch != null)
         {
             hashCode = hashCode * 59 + Ch.GetHashCode();
         }
         if (Chp != null)
         {
             hashCode = hashCode * 59 + Chp.GetHashCode();
         }
         if (Lp != null)
         {
             hashCode = hashCode * 59 + Lp.GetHashCode();
         }
         if (Ask != null)
         {
             hashCode = hashCode * 59 + Ask.GetHashCode();
         }
         if (Bid != null)
         {
             hashCode = hashCode * 59 + Bid.GetHashCode();
         }
         if (OpenPrice != null)
         {
             hashCode = hashCode * 59 + OpenPrice.GetHashCode();
         }
         if (HighPrice != null)
         {
             hashCode = hashCode * 59 + HighPrice.GetHashCode();
         }
         if (LowPrice != null)
         {
             hashCode = hashCode * 59 + LowPrice.GetHashCode();
         }
         if (PrevClosePrice != null)
         {
             hashCode = hashCode * 59 + PrevClosePrice.GetHashCode();
         }
         if (Volume != null)
         {
             hashCode = hashCode * 59 + Volume.GetHashCode();
         }
         return(hashCode);
     }
 }