public override bool Equals(object obj) { if (obj == this) { return(true); } if (obj == null || obj.GetType() != this.GetType()) { return(false); } NormalEvent ne = (NormalEvent)obj; return(odd1 == ne.getOdd1() && odd2 == ne.getOdd2() && drawOdd == ne.getDrawOdd() && base.Equals(ne)); }
/// <summary> /// Copy Constructor. /// </summary> /// <param name="ne">NormalEvent to be copied from.</param> public NormalEvent(NormalEvent ne) : base(ne) { this.odd1 = ne.getOdd1(); this.odd2 = ne.getOdd2(); this.drawOdd = ne.getDrawOdd(); }
/// <summary> /// Adds a NormalEvent (1/X/2) related to Football. /// </summary> /// <param name="id">Id of the event.</param> /// <param name="e">Instance of an event.</param> public override void AddEvent(int id, Event e) { NormalEvent ne = (NormalEvent)e; events.Add(id, ne); }