把这个50个数的顺序打乱,分别显示出来??怎么做???
public void RandSort(int[] _num) { Random rd = new Random(); int temp = 0, tempNum = 0; for (int i = 0; i < _num.Length-1; i++) { temp = rd.Next(i, _num.Length); tempNum=_num[i]; _num[i] = _num[temp]; _num[temp] = tempNum; Thread.Sleep(20);//注意:引入命名空间:System.Threading; } string str = null; foreach (int item in _num) { str += item.ToString() + ","; } MessageBox.Show(str); }