Esempio n. 1
0
        private static void Main(string[] args)
        {
            Test1 t1 = new Test1(100);

            Console.Write("初始");
            t1.DisplayValue();

            Console.Write("修改后");
            int x = t1.value;

            x = 200;
            t1.DisplayValue();

            Test2 t2 = new Test2(100);

            Console.Write("初始");
            t2.DisplayValue();

            Console.Write("修改后");
            ref int y = ref t2.value;