Link to the class :
https://stackoverflow.com/a/4543089/6591306
My question is simple, the usage of the class is as so :
The getter is getting () => variable, and the setter is getting z => { variable = z; }
In order to call the function i call it like this :
ref<int> tempx;
int tempy = 5;
tempx=new Ref<int>(() => tempy, z => { tempy = z; });
tempy = 6;//tempx.Value becomes 6
tempx.Value = 7;//tempy becomes 7
I want to achieve that in order to call the class i'll do it :
tempx=new Ref<int>(tempy);
without writing the actions, so that it won't take alot of lines of code, and the actions will be saved in the class, and whenever i call it they'll be performed automatically.
I dont know how to achieve it, therefore i'm asking here.