using System;
using System.Collections.Generic;
using System.Linq;
namespace ConsoleApplication1
{
class Program
{
private static int ArrayLength = 1000;
static void Main(string[] args)
{
var array = Enumerable.Range(1, ArrayLength)
.OrderBy(n => GetRandomSeed())
.ToArray<int>();
Console.ReadLine();
}
private static int GetRandomSeed()
{
byte[] bytes = new byte[4];
System.Security.Cryptography.RNGCryptoServiceProvider rng = new System.Security.Cryptography.RNGCryptoServiceProvider();
rng.GetBytes(bytes);
return BitConverter.ToInt32(bytes, 0);
}
}
}