随机生成数字和字母组合的6位验证码 (帮我看看哪有错)
char[]arr1=newchar[]{'0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f',...
char[] arr1 = new char[]{ '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n' }
char[]arr2=new char[6];
Random ra=new Random();
for(int i=0;i<arr2.Length;i++)
{
int j=ra.Next(0,23);
arr2[i]=arr2[j];
}
foreach(char c in arr2)
{
textBox1.Text+=c.ToString()+="";
}
textBox1.Text=" "; 展开
char[]arr2=new char[6];
Random ra=new Random();
for(int i=0;i<arr2.Length;i++)
{
int j=ra.Next(0,23);
arr2[i]=arr2[j];
}
foreach(char c in arr2)
{
textBox1.Text+=c.ToString()+="";
}
textBox1.Text=" "; 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询