Wednesday, March 4, 2015

Value type should change when its copy is changed.

I wanna do like next:


int a = 5;

int b = a;

a = 10;

b should change to equal 10.


I know about:


------------------------


ref and out


property get; set;


unsafe code


------------------------


Are these ways all?


Or there is a much more simpler way?


No comments:

Post a Comment