Esempio n. 1
0
 public Book(ISBN exactISBN, string exactAuthor, string exactName, string exactPublishingHouse,
             DateTime exactPublishmentYear, int exactPagesNumber, decimal exactPrice)
 {
     isbn            = exactISBN;
     author          = exactAuthor;
     name            = exactName;
     publishingHouse = exactPublishingHouse;
     publishmentYear = exactPublishmentYear;
     pagesNumber     = exactPagesNumber;
     price           = exactPrice;
 }
Esempio n. 2
0
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }

            if (obj.GetType() != GetType())
            {
                return(false);
            }

            ISBN isbn = (ISBN)obj;

            return(Equals(isbn));
        }
Esempio n. 3
0
        public int CompareTo(object o)
        {
            Book book = o as Book;

            return(ISBN.CompareTo(book.ISBN));
        }
Esempio n. 4
0
 public bool Equals(ISBN isbn)
 {
     return(CountryCode == isbn.CountryCode && PublishingHouseCode == isbn.PublishingHouseCode &&
            NumberOfBook == isbn.NumberOfBook && ControlNumber == isbn.ControlNumber);
 }