62,265
社区成员
发帖
与我相关
我的任务
分享 /**//// <summary>
/// 对List进行随机排序
/// </summary>
/// <param name="ListT"></param>
/// <returns></returns>
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;
}