예제 #1
0
        static void Main(string[] args)
        {
            DictionaryStudents ds = new DictionaryStudents();

            Console.WriteLine("Enter the number of the students: ");
            int n = Int32.Parse(Console.ReadLine());

            ds.AddStudents(n);


            Console.WriteLine("Output of the list of students with foreach");
            foreach (var st in ds)
            {
                Console.WriteLine("{0}   {1}", st.Key, st.Value);
            }

            Console.WriteLine("Output info about first student");
            Student s = ds.GetKeys().First <Student>();

            Console.WriteLine("{0}   {1}", s, ds[s]);
            * /



            Console.ReadKey();
        }
예제 #2
0
        static void Main(string[] args)
        {
            DictionaryStudents ds = new DictionaryStudents();

            ds.AddStudents(3);
            ds.ListStudents();

            Console.ReadKey();
        }