Is it possile to store a reference to an object in a class, so that if the referenced object is changed in by the class, the object is changed everywhere. This could easily be done with a pointer, but they are a bit dirty i c#.
Here is an example of what I mean:
|
I know this won't work, but maybe you can se what I'm trying to do. I want the reference to a stored in b for later mnipulation. Can this be done elegantly perhaps?
Sam HobbsPosted Sep 21, 2010, 9:44 PM
Gomathi PalaniswamyPosted Sep 21, 2010, 6:58 AM
In c# use your pointer coding with in unsafe.I think the below coding will be helpful for your reference,
http://www.c-sharpcorner.com/UploadFile/rajeshvs/PointersInCSharp11112005051624AM/PointersInCSharp.aspx
With Regards,
Gomathi.P