原文链接:http://www.cnblogs.com/TouchAfflatus/p/3784225.html
提高随机数不重复概率的种子生成方法:
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 );
}
Random random = new Random( GetRandomSeed( ) );