Values & References8 / 14
Up next

ref parameters

// ref binds to the caller's variable, so writes stick
void Bump(ref int n) => n += 1;

int x = 10;
Bump(ref x);
Console.WriteLine(x);
What you're solving

pass the variable itself