WikiCrawler/Utility/IListUtility.cs
/// <summary>
/// Randomly shuffles the elements in the list.
/// </summary>
Randomly shuffles the elements in the list.
Randomly shuffles the elements in the list .
public static void Shuffle<T>(this IList<T> list)
	{
		int n = list.Count;
		while (n > 1)
		{
			n--;
			int k = s_random.Next(n + 1);
			T value = list[k];
			list[k] = list[n];
			list[n] = value;
		}
	}
public static void Shuffle < T > ( this IList < T > list ) { int n = list . Count ; while ( n > 1 ) { n -- ; int k = s_random . Next ( n + 1 ) ; T value = list [ k ] ; list [ k ] = list [ n ] ; list [ n ] = value ; } }
Randomly shuffles the elements in the list.
Randomly shuffles the elements in the list .
IList<T>
this