日期:2014-05-20  浏览次数:20666 次

C#关于Random()函数的使用困惑
比如:
for(int   i;i <10;i++)
{

}

------解决方案--------------------
看看我的随机验证码,看看对你有无启发:
public static string YanZhengMa(byte Length)
{
System.Random rand=new Random();
string result= " ";
for (int i=0;i <Length;i++)
{
result+=rand.Next(3);
}
return result;
}
使用:

x3=db.YanZhengMa(2);
this.Labelysxs.Text= " <font color=#ff3300> 服务器繁忙,请稍等: "+x3.ToString()+ " 秒! </font> ";
顺便帮忙考虑下我的问题,帮顶一下!!!
http://community.csdn.net/Expert/topic/5293/5293251.xml?temp=.8407251