Exemple #1
0
        } // end method my lesson 16 examples

        static void MyLesson15Examples()
        {
            Lesson15 my15 = new Lesson15();

            my15.CheckExternalEnum();
            my15.MyFavoriteFlavor(Lesson15.IceCreamFlavors.Chocolate);

            my15[2] = 17;
            for (int i = 0; i < my15.ConeArrayLength; i++)
            {
                Console.WriteLine("Value of {0} = {1}", i, my15[i]);
            }
        } // end my lesson 15 examples
Exemple #2
0
        static void MyLesson15Examples()
        {
            Lesson15 my15 = new Lesson15();

            my15.BasicEnumCasting();
            my15.MyFavoriteFlavor(Lesson15.IceCreamFlavors.ChocolateChip);
            // Constants can not be altered, but can be used
            Console.WriteLine(Lesson15.words);
            my15[2] = 17;

            for (int i = 0; i < my15.ConeArrayLength; i++)
            {
                Console.WriteLine("The Value of {0} = {1}", i, my15[i]);
            }
        }