Esempio n. 1
0
        // Printing method:
        public void switchNum(int num)
        {
            switch (num)
            {
            case 1:
                Console.WriteLine("Yay");
                Person person = new Person();
                person.CreateMgcYrCal();
                break;

            case 2:
                FizzBuzz minMax = new FizzBuzz(1, 100);
                minMax.PrintFizzBuzz();
                break;

            case 3:
                Child child = new Child();
                child.CreateChild();
                break;

            default:
                Console.WriteLine("Please enter a number between 1 - 3.");
                break;
            }    // does not execute switch
        }
Esempio n. 2
0
        static void FizzBuzz()
        {
            FizzBuzz MinMax = new FizzBuzz(1, 100);

            MinMax.PrintFizzBuzz();
        }