62,046
社区成员
发帖
与我相关
我的任务
分享
protected string yzm()
{
string[] dzm ={ "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z" };
string[] xzm ={ "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z" };
string[] num ={ "0", "1", "2", "3", "4", "5", "6", "7", "8", "9" };
string str = "";
for (int j = 0; j < 3; j++)
{
Random r = new Random();
int i = r.Next(1, 3);
if (i == 1)
{
Random r1 = new Random();
int R1 = r1.Next(1, 26);
str += dzm[R1];
}
if (i == 2)
{
Random r2 = new Random();
int R2 = r2.Next(1, 26);
str += xzm[R2];
}
}
return str;
}
string[] dzm = { "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z" };
string[] xzm = { "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z" };
string[] num = { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9" };
string str = "";
for (int j = 0; j < 3; j++)
{
Random r = new Random();
int i = r.Next(1, 3);
if (i == 1)
{
Random r1 = new Random();
int R1 = r1.Next(1, 26);
str += dzm[R1];
System.Threading.Thread.Sleep(10);
}
if (i == 2)
{
Random r2 = new Random();
int R2 = r2.Next(1, 26);
str += xzm[R2];
System.Threading.Thread.Sleep(10);
}
}
this.tbCount.Text = str;