namespace LINQRandom
{
class Program
{
static void Main(string[] args)
{
Random r = new Random(Guid.NewGuid().GetHashCode());
var result = Enumerable.Range(0, 10).OrderBy(o => r.Next());
foreach (var item in result)
{
Console.WriteLine(item);
}
}
}
}
沒有留言:
張貼留言