using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
///
/// Summary description for ObjectUtils
///
namespace UTSDAL.LINQSQL.Utils
{
public class ObjectUtils
{
///
/// wraps predefined objects with desired attributes and provides them to calling instances
///
public ObjectUtils()
{
}
///
/// randomises elements in List
///
///
///
///
public static List Randomize(List list)
{
List randomizedList = new List();
Random rnd = new Random();
while (list.Count > 0)
{
int index = rnd.Next(0, list.Count); //pick a random item from the master list
randomizedList.Add(list[index]); //place it at the end of the randomized list
list.RemoveAt(index);
}
return randomizedList;
}
}
}