1、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;
}
2、随机生成题目
/// <summary>
/// 随机生成题目
/// </summary>
/// <returns></returns>
public List<Entities.V_Quelibrary> GetRandomQue()
{
List<string> names = new List<string>();
List<string> values = new List<string>();
string itemId =Config.QueType;
string hql = "from V_Quelibrary where state=1 and Item_Id=:Item_Id";
names.Add("Item_Id");
value