string str = "";
Random rnd = new Random();
int ch;
for(int i = 0;i < 10000 ;i++)
{
ch = rnd.Next(97,122);
str += Convert.ToChar(ch);
}
A-Z随机取10000个字符 组成长度为10000的字符串
最新推荐文章于 2025-11-15 13:53:46 发布
博客展示了一段代码,通过Random类生成随机数,将其转换为字符并拼接成字符串。代码循环10000次,每次生成97到122之间的随机数,转换为字符后添加到字符串中。
3100

被折叠的 条评论
为什么被折叠?



