public override int GetHashCode() { unchecked { var hashCode = StockId.GetHashCode(); hashCode = (hashCode * 397) ^ AskPrice.GetHashCode(); hashCode = (hashCode * 397) ^ AskQuantity.GetHashCode(); hashCode = (hashCode * 397) ^ OrderId.GetHashCode(); return(hashCode); } }
private bool Equals(Ask other) { return(string.Equals(StockId, other.StockId) && AskPrice == other.AskPrice && AskQuantity.Equals(other.AskQuantity) && string.Equals(OrderId, other.OrderId)); }