I just made a Swap routine in C# like this:
static void Swap(ref int x, ref int y) { int temp = x; x = y; y = temp; }
It does t
The nice thing about using out is that you're guaranteed that the item will be assigned a value -- you will get a compile error if not.