Exemple #1
0
        public static void RunTest()
        {
            TheStruct a = new TheStruct();
            TheClass  b = new TheClass();

            a.x = 1;
            b.x = 1;
            structtaker(a);
            classtaker(b);
            Console.WriteLine("a.x = {0}", a.x); // a.x = 1
            Console.WriteLine("b.x = {0}", b.x); // b.x = 5
        }
Exemple #2
0
 public static void structtaker(TheStruct s)
 {
     s.x = 5;
 }