public Music(Singer nameS, Author nameA, int time, string nameM, string link) { NameS1 = nameS; NameA = nameA; Time = time; NameM1 = nameM; Link = link; }
void InitMusic() { // Person a = new Person(); vi du ve truu tuong - khong the tao 1 thuc the qua truu tuong //Singer singer = new Singer(); - vi du ve phuong thuc nhap //singer.Name = "aa"; //MessageBox.Show(singer.Name); people = new Person[10]; people[0] = new Singer("Lap Nguyen", new DateTime(123), true, 1000); people[1] = new Author(); people[2] = new Singer("Min", new DateTime(456), true, 1000); people[3] = new Author(); people[4] = new Singer("Lil Nas X_ Billy", new DateTime(789), true, 1000); people[5] = new Author(); musics = new Music[10]; musics[0] = new Music((Singer)people[0], (Author)people[1], 123, "Em Bang Qua", "./Em Bang Qua - Lap Nguyen.wav"); musics[1] = new Music((Singer)people[2], (Author)people[3], 123, "Tren Tinh Ban Duoi Tinh Yeu", "./Tren Tinh Ban Duoi Tinh Yeu - Min.wav"); musics[2] = new Music((Singer)people[0], (Author)people[3], 123, "Old Town Road", "./Old Town Road Remix_ - Lil Nas X_ Billy.wav"); //media = new Media(musics[0].getLink()); media.play(); }