예제 #1
0
        public override bool Equals(System.Object otherBooks)
        {
            if (!(otherBooks is Books))
            {
                return(false);
            }
            else
            {
                Books newBooks      = (Books)otherBooks;
                bool  titleEquality = this.GetTitle() == newBooks.GetTitle();
                bool  idEquality    = this.GetId() == newBooks.GetId();

                return(titleEquality && idEquality);
            }
        }