//创建数组
string[] test = new string[100];
test[0] = "a";
test[1] = "aba";
test[2] = "cccc";
//随机取数组中数据
Random rnd = new Random(GetRandomSeed());
int s = rnd.Next(0, 99);
//显示
TextBox1.Text = s.ToString();
///
/// 加密随机数生成器 生成随机种子
///
///
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);
}