Skip to main content

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); ``

Back to lesson: Practice: Parameter Passing Practice