不重复验证码
1 string s ="1234567890zxcvbnmasdfghjklqwertyuiopZXCVBNMASDFGHJKLQWERTYUIOP";
2 string str="";
3 Radom rand =new Random();//初始化隨機數(shù)
4 string[]arr=new string[4];
5 for (int i=0;i<4;i++)?
6 {
7 arr[i] =rand.Next(62);//生成一個隨機數(shù)的起始位置
8 int cont=0;
9 if(i>0)
10 {
11 for(int j=0;j<i;j++)
12 {
13 if(arr[i]==arr[j])
14 {
15 count++;
16 }
17 }
18 }
19 if(count>0)
20 {
21 i--;
22 continue;
23 } View Code
?
轉載于:https://www.cnblogs.com/zxm1002/p/4968428.html
總結
- 上一篇: Silverlight Blend动画
- 下一篇: CSS 布局