public override bool Equals(object obj) { if (base.Equals(obj)) //in case we add new props { EnergyConsumer x = (EnergyConsumer)obj; return(x.FirstName == this.FirstName && x.LastName == this.LastName && x.Type == this.Type); } else { return(false); } }
protected EnergyConsumer(EnergyConsumer ec) : base(ec) { FirstName = ec.FirstName; LastName = ec.LastName; Type = ec.Type; }