Ejemplo n.º 1
0
        /*
         * Now, if you pass an object that is based on this type to a method,
         * a reference to the object is passed.
         * The following example passes an object of type SampleRefType to method ModifyObject.
         */
        public static void TestRefType()
        {
            SampleRefType rt = new SampleRefType();

            rt.value = 44;
            ModifyObject(rt);
            Console.WriteLine(rt.value);
        }
Ejemplo n.º 2
0
 static void ModifyObject(SampleRefType obj)
 {
     obj.value = 33;
 }