/// <summary>
/// 解決僞随機問題
/// </summary>
public static void Random()
{
int t = 0;
for (int i = 0; i < 10; i++)
{
byte[] bytes = new byte[4];
System.Security.Cryptography.RNGCryptoServiceProvider rng = new System.Security.Cryptography.RNGCryptoServiceProvider();
rng.GetBytes(bytes);
t = BitConverter.ToInt32(bytes, 0);
Random rnd = new Random(t);
Console.WriteLine(rnd.Next(0, 10));
}
}
從此山高路遠,縱馬揚鞭。願往後旅途,三冬暖,春不寒,天黑有燈,下雨有傘。此生盡興,不負勇往。