CSharp examples for System.Collections.Generic:IEnumerable
Order By Random
using System.Linq; using System.Collections.Generic; using System;/* w ww . jav a 2s . c o m*/ public class Main{ public static IEnumerable<T> OrderByRandom<T>(this IEnumerable<T> source) { var rnd = new Random(); return source.OrderBy(x => rnd.Next()); } }