Beispiel #1
0
        internal void AddTestingData()
        {
            CatalogCD _cd1 = new CatalogCD()
            {
                Artist  = "Bob Dylan",
                Title   = "Empire Burlesque",
                Country = "USA",
                Company = "Columbia",
                Price   = 10.90M,
                Year    = 1985,
            };
            CatalogCD _cd2 = new CatalogCD
            {
                Title   = "Hide your heart",
                Artist  = "Bonnie Tyler",
                Country = "UK",
                Company = "CBS Records",
                Price   = 9.90M,
                Year    = 1988
            };

            CD = new CatalogCD[] { _cd1, _cd2 };
        }
Beispiel #2
0
        public override bool Equals(object obj)
        {
            CatalogCD _catalogCD = obj as CatalogCD ?? throw new System.ArgumentException(nameof(obj), "wrong parameter type");

            return(ToString() == _catalogCD.ToString());
        }