private void Swap(int first, int second) { var temp = Commands[second]; Commands[second] = Commands[first]; Commands[first] = temp; }