/* * 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); }
static void ModifyObject(SampleRefType obj) { obj.value = 33; }