Exemple #1
0
 public static void ShowAll(StudentContainer printedContainer)
 {
     foreach (var i in printedContainer)
     {
         OutputStudent(i);
     }
 }
Exemple #2
0
        public static void Start()
        {
            var  pigsty = new StudentContainer();
            char choice = 'a';

            Console.WriteLine("Hello World! Our copany introduces the next level of data base - AllBase");
            Console.WriteLine("The array of Student object is created, my lord.");

            while (choice != '0')
            {
                PrintMenu();
                Console.Write("Make a choice: ");
                choice = Io.InputChar();

                switch (choice)
                {
                case '1':
                    Io.ShowAll(pigsty);
                    break;

                case '2':
                    pigsty.AddStudent(Io.InputStudent());
                    break;

                case '3':
                    Console.Write("Input the index: ");
                    pigsty.DeleteStudent(Io.InputInt());
                    break;

                case '4':
                    Console.Write("Input the index: ");
                    pigsty.ShowByIndex(Io.InputInt());
                    break;
                }
            }
        }