Can I refer to a bool or int?
I'd like to create a reference to value types, such as int or bool. It's something like this:
int i =5;
int j = ref i;
j = 6;
// I hope the value of i be 6, instead of 5.
How can I do this?
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
vitek20 reputationPosted Sep 3, 2004, 1:18 AM EDT
wygmail5 reputationPosted Sep 3, 2004, 4:19 AM EDT
MykonineRank #2,671 · 521 reputationPosted Sep 3, 2004, 9:19 AM EDT
timborama045 reputationPosted Sep 3, 2004, 11:00 AM EDT
wygmail5 reputationPosted Sep 3, 2004, 8:39 PM EDT
boxn4 reputationPosted Sep 4, 2004, 2:55 AM EDT