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

            a.x = 1;
            b.x = 1;
            structtaker(a);
            classtaker(b);
            Console.WriteLine("Struct never change,Class changed");
            Console.WriteLine("Struct a.x = {0}", a.x);
            Console.WriteLine("Class b.x = {0}", b.x);
        }
Example #2
0
 public static void structtaker(TheStruct s)
 {
     s.x = 5;
 }