I wish to directly modify a variable\'s value outside of a method from inside it. Pointers are the way, correct?
How?
Pointers are the way, correct?
Not in C# they're not. Use ref parameters:
void Times2(ref int a) { a = a * 2; } void Foo() { int x = 1; Times2(ref x); // x is now 2 }