[C#] C#生成随机ArrayList →→→→→进入此内容的聊天室

来自 , 2019-08-20, 写在 C#, 查看 186 次.
URL http://www.code666.cn/view/d71f5142
  1.  public static void RandomizeArrayList(ArrayList arrayList, Random random) {
  2.     if(arrayList == null) { return; }
  3.     int count = arrayList.Count;
  4.     for(int i=0;i<count;i++) {
  5.        Object tmp = arrayList[i];
  6.        arrayList.RemoveAt(i);
  7.        arrayList.Insert(random.Next(count), tmp);
  8.     }
  9.  }
  10. //csharp/4866

回复 "C#生成随机ArrayList"

这儿你可以回复上面这条便签

captcha