Beispiel #1
0
        private static void SelectMenuFirst()
        {
            Console.Write("Jawab: ");
            string answer = Console.ReadLine();

            switch (answer)
            {
            case "1":
                Console.Clear();
                Telkomsay.Home();
                break;

            case "2":
                Console.Clear();
                Indosay.Home();
                break;

            case "3":
                break;

            default:
                Console.Clear();
                Console.WriteLine("Tidak ada menu tersedia yang kamu pilih");
                Console.WriteLine();
                Main();
                break;
            }
        }
Beispiel #2
0
        private static void ReffMenu(int menu)
        {
            string     str      = "Menu_" + menu;
            Type       type     = typeof(Telkomsay);
            MethodInfo myMethod = type.GetMethod(str);
            Telkomsay  tel      = new Telkomsay();

            myMethod.Invoke(tel, null);
        }