public override bool Equals(Object otherBand) { if (!(otherBand is Band)) { return(false); } else { Band band = (Band)otherBand; bool idEquality = _id == band.GetId(); bool nameEquality = _name == band.GetName(); return(idEquality && nameEquality); } }
public override bool Equals(System.Object otherBand) { if (!(otherBand is Band)) { return(false); } else { Band newBand = (Band)otherBand; bool idEquality = (this.GetId() == newBand.GetId()); bool nameEquality = (this.GetName() == newBand.GetName()); return(idEquality && nameEquality); } }
public override bool Equals(Object otherBand) { if (!(otherBand is Band)) { return(false); } else { Band newBand = (Band)otherBand; bool idEquality = newBand.GetId() == this._id; bool nameEquality = newBand.GetName() == this._name; bool numberOfPlayersEquality = newBand.GetNumberOfPlayers() == this._numberOfPlayers; return(idEquality && nameEquality && numberOfPlayersEquality); } }