public void HienThiDanhSach() { int n; Console.WriteLine("\nnhap so sach:"); n = Int32.Parse(Console.ReadLine()); SachGiaoKhoa[] sgk = new SachGiaoKhoa[n]; for (int i = 0; i < n; i++) { sgk[i] = new SachGiaoKhoa(); sgk[i].NhapThongTinSach(); sgk[i].HienThiSach(); } }
static void Main(string[] args) { Console.Write("\nCau a"); Book sach1 = new Book(); sach1.NhapThongTinSach(); sach1.HienThiSach(); Console.Write("\nCau b"); SachGiaoKhoa sach2 = new SachGiaoKhoa(); sach2.NhapThongTinSach(); sach2.HienThiSach(); Console.Write("\nCau c"); SachMain sach3 = new SachMain(); sach3.HienThiDanhSach(); Console.ReadKey(); }