HTML模版大全LOGO
 


C# List 泛型随机排序

收藏

 public List RandomSortList(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;
        }

标签 C#List泛型

评论(0条)

请登录后评论