示例#1
0
        private static List <KhuDat> InputListKhuDat()
        {
            System.Console.WriteLine("Nhap tong so dat ");
            int           N          = Convert.ToInt32(Console.ReadLine());
            List <KhuDat> listKhuDat = new List <KhuDat>();

            System.Console.WriteLine("\n ===Nhap danh sach dat===");
            for (int i = 0; i < N; i++)
            {
                System.Console.WriteLine("\n - Nhap khu dat thu {0}", i + 1);
                KhuDat temp = new KhuDat();
                temp.Input();
                listKhuDat.Add(temp);
            }
            return(listKhuDat);
        }
示例#2
0
        private static List <KhuDat> InputListKD()
        {
            List <KhuDat> listKhuDats = new List <KhuDat>();

            Console.Write("Input N=");
            int N = Convert.ToInt32(Console.ReadLine());

            Console.WriteLine("\n ----Input List KD----");
            for (int i = 0; i < N; i++)
            {
                Console.WriteLine("\n - Input KD thu {0}", i + 1);
                KhuDat temp = new KhuDat();
                temp.Input();
                listKhuDats.Add(temp);
            }
            return(listKhuDats);
        }