コード例 #1
0
        public static void Menu()
        {
            Console.WriteLine("enter option");
            Console.WriteLine("1 to Add");
            Console.WriteLine("2 to Display");
            Console.WriteLine("3 to Exit");
            int option = Convert.ToInt32(Console.ReadLine());

            switch (option)
            {
            case 1:
                ManagingServices.Add();

                break;

            case 2:
                ManagingServices.DisplayList();
                break;

            case 3:
                Console.WriteLine("Press 3 to exit");
                int press = Convert.ToInt32(Console.ReadLine());
                if (press == 3)
                {
                    break;
                }
                break;
            }

            if (option != 3)
            {
                Menu();
            }
        }
コード例 #2
0
        static void Main(string[] args)
        {
            ManagingServices manager = new ManagingServices();

            ManagingServices.Deserializer();
            Menu();
        }