码迷,mamicode.com
首页 > 其他好文 > 详细

随机生成验证码

时间:2015-04-03 09:13:04      阅读:120      评论:0      收藏:0      [点我收藏+]

标签:

static void Main(string[] args)
{
while (true)
{
string sj = "abcdefghijklmnopqrstuvwxyz";
string sj1 = "啊爱的额发人个额而非果然他额额额图腾";
Random r=new Random();
string s1=sj.Substring(r.Next(0,26),1);
s1+=sj1.Substring(r.Next(0,sj1.Length),1);
s1+=sj.Substring(r.Next(0,26),1);
s1+=sj1.Substring(r.Next(0, sj1.Length),1);
Console.WriteLine(s1);
Console.ReadLine();
}

}

随机生成验证码

标签:

原文地址:http://www.cnblogs.com/dlexia/p/4389062.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!