Reference to reference in C# -
in c# want pass reference object not yet instantiated. this:
myclass obj = new myclass(obj);
in c++ this:
class myclass { public: myclass( myclass **obj ) : the_obj( obj ) { } myclass** the_obj; }; myclass *obj = new myclass(&obj);
how do in c#?
regards.
just create mutable class has reference type interested in member:
public class wrapper<t> { public t value { get; set; } }
wrapper<myclass> wrapper = new wrapper<myclass>();
you have reference instance reference instance of myclass
.
c# reference
No comments:
Post a Comment