Practice · 2 of 3
ref: State That Survives the Call
CHALLENGE
Difficulty: intermediate+25 XP
Two contracts. Total adds every item to the CALLER's running and returns the new total. Swap exchanges two ints through ref.
``csharp
static long Total(ref long running, int[] additions);
static void Swap(ref int x, ref int y);
``
Press Submit to check your solution.
Back to lesson: Practice: Parameter Passing Practice