Example #1
0
        public static void PartThreeStart()
        {
            int    amount   = 50;
            string splitter = "=";

            Program.center(amount, "Start of The Third Part", "*");
            //////////////////////////////////////////////
            Program.center(amount, "Extinsions", splitter);
            Extinsions extinsions = new Extinsions();

            extinsions.StartExample();
            //////////////////////////////////////////////
            Program.center(amount, "Partial methods and classes", splitter);
            StartPartial.StartExample();
            //////////////////////////////////////////////
            Program.center(amount, "Anon types", splitter);
            AnonoimoysTypes.StartExample();
            //////////////////////////////////////////////
            Program.center(amount, "Local functions", splitter);
            LocalFunctions.StartExample();
            //////////////////////////////////////////////
            Program.center(amount, "Deconstruction for beginers", splitter);
            Deconstruction.StartExample();
            //////////////////////////////////////////////
            Program.center(amount, "Pattern matching", splitter);
            PatternMatching.StartExample();////
            //////////////////////////////////////////////
            Program.center(amount, "Nullable Types", splitter);
            NullableTypes.StartExample();
            //////////////////////////////////////////////
            Program.center(amount, "Reference vars", splitter);
            ReferenceVars.StartExample();
            //////////////////////////////////////////////
        }
Example #2
0
        public static void Run()
        {
            char key;

            while (true)
            {
                printMenu();

                key = Console.ReadKey().KeyChar;

                Console.WriteLine();
                switch (key)
                {
                case 'n':
                    namespaceDemo();
                    break;

                case 'e':
                    extentionMethodDemo();
                    break;

                case 'p':
                    partialClass();
                    break;

                case 'a':
                    AnonymousTypes.Display();
                    break;

                case 'l':
                    LocalFunction.Display();
                    break;

                case 'm':
                    PatternMatching.Display();
                    break;

                case 'd':
                    DeconstructorDemo.Display();
                    break;

                case 'u':
                    NullableTypes.Display();
                    break;

                case 'r':
                    ReferenceVars.Display();
                    break;

                case 'x': return;
                }
                Console.ReadKey();
            }
        }