public static int[] sortAsc(int[] array) { if (array != null) { int temp; for (int i = 0; i < array.Length; i++) { for (int j = i + 1; j < array.Length; j++) { if (array[j] < array[i]) {//顺序:把小的调前,倒序:把大的调前 temp = array[i]; array[i] = array[j]; array[j] = temp; } } } } return array; }