class ReaderState { public Type type; public TypeClass kl; public ReaderState (Type t, TypeClass k) { stdout.printf("ReaderState start: k %p\n", k); this.type = t; this.kl = k; stdout.printf("ReaderState end: k %p this.kl: %p\n", k, this.kl); } } static void set_state(ReaderState r, out Type t, out TypeClass k) { stdout.printf("Set_state start r.kl %p\n", r.kl); t = r.type; k = r.kl; stdout.printf("Set_state end k: %p, r.kl %p\n", k, r.kl); } public static int main(string [] argv) { var type = typeof (ReaderState); var klass = type.class_ref (); Type t2; TypeClass kl2; ReaderState r = new ReaderState (type, klass); stdout.printf("klass: %p r.kl: %p\n", klass, r.kl); set_state (r, out t2, out kl2); stdout.printf("%d, %p : %d, %p\n", (int)type, klass, (int)t2, kl2); return 0; }