C# 随机四位数验证码

string str ="abcdefghigklmnopqrstuvwxyzABCDEFJHIGKLMNOPQRSTUVWXYZ1234567890";
while(true){
string yzm = "";
Random rm = new Random();
for (int i = ; i < ; i++)
{
int index = rm.Next(, str.Length);
string x = str.Substring(index, );
yzm += x;
}
Console.Write(yzm);
string a = Console.ReadLine();
if(a == yzm)
       {
break;
       }
}

Console.Read();
上一篇:移动端的弹窗滚动禁止body滚动


下一篇:JS基础语法---Array对象的方法