1. //int[] nums = new int[] { 1, 2, 3 };
    2. //for (int j = 1; j < nums.Length; j++)
    3. //{
    4. (nums[j - 1], nums[j]) = (nums[j], nums[j - 1]);
    5. //}
    6. //for (int a = 0; a < nums.Length; a++)
    7. //{
    8. // Console.WriteLine(nums[a]);
    9. //}

    结果为231