C#对list列表进行随机排序
public List<T> RandomSortList<T>(List<T> ListT) { Random random = new Random(); List<T> newList = new List<T>(); foreach (T item in ListT) { newList.Insert(random.Next(newList.Count + 1), item); } return newList; }
C#对list列表进行随机排序
public List<T> RandomSortList<T>(List<T> ListT) { Random random = new Random(); List<T> newList = new List<T>(); foreach (T item in ListT) { newList.Insert(random.Next(newList.Count + 1), item); } return newList; }