C# List 泛型随机排序
收藏
public ListRandomSortList (List list) { Random rd = new Random(); List newList = new List (); foreach (T item in list) { newList.Insert(rd.Next(newList.Count + 1), item); } return newList; }
public ListRandomSortList (List list) { Random rd = new Random(); List newList = new List (); foreach (T item in list) { newList.Insert(rd.Next(newList.Count + 1), item); } return newList; }