Exemple #1
0
        static void ModifierExamples()
        {
            int       test      = 14;
            Lessons11 myLessons = new Lessons11();

            myLessons.RefSamples(ref test);
            Console.WriteLine(test);
            string first, second;

            myLessons.OutSample("John Doe", out first, out second);

            Console.WriteLine(first);
            Console.WriteLine(second);
        }
Exemple #2
0
        static void Lessons11Samples()
        {
            Lessons11 Lessons = new Lessons11();

            Lessons.useParams(10, 3, 24, 36, 45, 120);

            Lessons.useParams();

            int[] intArray = { 2, 3, 4, 5, 6 };
            Lessons.useParams(intArray);

            Lessons.useParams2(1, "Happy", false, 34, 5F);

            Lessons.OptionalParams("Roger");
            Lessons.OptionalParams("Mathew", 19);
        }