Пример #1
0
 public override bool Equals(System.Object randomBand)
 {
     if (!(randomBand is Band))
     {
         return(false);
     }
     else
     {
         Band newBand      = (Band)randomBand;
         bool idEquality   = (this.GetId() == newBand.GetId());
         bool nameEquality = (this.GetName() == newBand.GetName());
         return(idEquality && nameEquality);
     }
 }
Пример #2
0
 public override bool Equals(System.Object otherBand)
 {
     // This function overrides the built-in Equals Method to ensure it returns true if two band objects are identical
     if (!(otherBand is Band))
     {
         return(false);
     }
     else
     {
         Band newBand      = (Band)otherBand;
         bool nameEquality = this.GetName() == newBand.GetName();
         bool idEquality   = this.GetId() == newBand.GetId();
         return(nameEquality && idEquality);
     }
 }
Пример #3
0
        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();
                bool agentContactEquality = this.GetAgentContact() == newBand.GetAgentContact();
                bool agentEquality        = this.GetAgent() == newBand.GetAgent();
                bool genreEquality        = this.GetGenre() == newBand.GetGenre();
                bool leaderEquality       = this.GetLeader() == newBand.GetLeader();
                bool membersEquality      = this.GetMembers() == newBand.GetMembers();
                bool originPlaceEquality  = this.GetOriginplace() == newBand.GetOriginplace();
                bool originYearEquality   = this.GetoriginYear() == newBand.GetoriginYear();

                return(idEquality && nameEquality && agentEquality && agentContactEquality && genreEquality && leaderEquality && membersEquality && originPlaceEquality && originYearEquality);
            }
        }