/// <summary> /// Returns true if OutputMarketIndex instances are equal /// </summary> /// <param name="other">Instance of OutputMarketIndex to be compared</param> /// <returns>Boolean</returns> public bool Equals(OutputMarketIndex other) { if (other is null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( Date == other.Date || Date != null && Date.Equals(other.Date) ) && ( Symbol == other.Symbol || Symbol != null && Symbol.Equals(other.Symbol) ) && ( Exchange == other.Exchange || Exchange != null && Exchange.Equals(other.Exchange) ) && ( Open == other.Open || Open.Equals(other.Open) ) && ( High == other.High || High.Equals(other.High) ) && ( Low == other.Low || Low.Equals(other.Low) ) && ( Close == other.Close || Close.Equals(other.Close) ) && ( Volume == other.Volume || Volume.Equals(other.Volume) ) && ( AdjOpen == other.AdjOpen || AdjOpen.Equals(other.AdjOpen) ) && ( AdjHigh == other.AdjHigh || AdjHigh.Equals(other.AdjHigh) ) && ( AdjLow == other.AdjLow || AdjLow.Equals(other.AdjLow) ) && ( AdjClose == other.AdjClose || AdjClose.Equals(other.AdjClose) ) && ( AdjVolume == other.AdjVolume || AdjVolume.Equals(other.AdjVolume) )); }
private bool Equals(Stock other) { return(Date.Date.Equals(other.Date.Date) && Open.Equals(other.Open) && High.Equals(other.High) && Low.Equals(other.Low) && Close.Equals(other.Close) && AdjClose.Equals(other.AdjClose) && Volume.Equals(other.Volume)); }