示例#1
0
            static void Main(string[] args)
            {
                Console.WriteLine("Menu");

                Console.WriteLine("====");

                Console.WriteLine("1.Car");

                Console.WriteLine("2.Bike");

                Console.WriteLine("3.Exit");

                Console.WriteLine("Enter your choice");

                int list = int.Parse(Console.ReadLine());

                switch (list)
                {
                case 1:
                    TwoFourwheeler o = new TwoFourwheeler();
                    o.Car();
                    break;

                case 2:
                    TwoFourwheeler o1 = new TwoFourwheeler();
                    o1.Bike();
                    break;

                case 3:
                    TwoFourwheeler o2 = new TwoFourwheeler();
                    o2.Exit();
                    break;

                default:
                    break;
                }
                Console.ReadLine();
            }
示例#2
0
            static void Activa()
            {
                Console.WriteLine("Activa Specification");
                Console.WriteLine("====");
                Console.WriteLine("Price : 65 Thousand");
                Console.WriteLine("Mileage : 50km/Litre");
                Console.WriteLine("Color : Black");
                Console.WriteLine("Do you want to exit : (Yes / No)");

                string choice = Console.ReadLine();

                if (choice == "Yes")
                {
                    Environment.Exit(1);
                }

                if (choice == "No")
                {
                    TwoFourwheeler o1 = new TwoFourwheeler();
                    o1.Bike();
                }
                Console.ReadLine();
            }
示例#3
0
            static void Splender()
            {
                Console.WriteLine("Splendar Specification");
                Console.WriteLine("====");
                Console.WriteLine("Price : 70 Thousand");
                Console.WriteLine("Mileage : 75km/Litre");
                Console.WriteLine("Color : Red");
                Console.WriteLine("Do you want to exit : (Yes / No)");

                string choice = Console.ReadLine();

                if (choice == "Yes")
                {
                    Environment.Exit(1);
                }

                if (choice == "No")
                {
                    TwoFourwheeler o1 = new TwoFourwheeler();
                    o1.Bike();
                }
                Console.ReadLine();
            }