/// <summary>
/// 冒泡排序
/// </summary>
/// <param name="array"></param>
/// <returns></returns>
private static int[] GetSort(int[] array)
{
//外层循环n-1
for (int i = 0; i < array.Length-1; i++)
{
//内层循环n-1-i
for (int j = 0; j < array.Length-1-i; j++)
{
if (array[j] > array[j+ 1])
{
int temp = array[j];
array[j] = array[j + 1];
array[j + 1] = temp;
}
}
}
return array.ToArray();
}
}