Exemplo n.º 1
0
        } // end method my lesson 11 examples

        static void MyLesson10Examples()
        {
            Lesson10 myTen = new Lesson10();

            myTen.BasicPublicMethod();
            Lesson5 myFive = new Lesson5();

            myFive._myLongValue = 12345L; // can see because internal
        } // end lesson 10 examples
Exemplo n.º 2
0
        static void MyLesson10Examples()
        {
            Lesson10 myTen      = new Lesson10(); // default constructor
            Lesson10 myOtherTen = new Lesson10(10);
            Lesson10 lesson10   = new Lesson10(21, "apples");

            Lesson10Struct myStruct = new Lesson10Struct(9.99m, "King", "The Stand");

            int myVal1 = 14, myVal2 = 14;

            myTen.MyBasicRef(ref myVal1, myVal2);;
            Console.WriteLine("My Val1 = {0} , My Val2 = {1}", myVal1, myVal2);


            string first, last;

            myTen.MyBasicOut("FogHorn Leghorn", out first, out last);
            Console.WriteLine(first);
            Console.WriteLine(last);
        }