标签:style blog color os ar div sp log c
/// <summary> /// 生成随机数字窜 /// </summary> /// <param name="Digit">位数</param> /// <returns></returns> private string RandomNum(int Digit) { StringBuilder sb = new StringBuilder(); Random random = new Random(); int Nums = Digit; while (Nums > 0) { int i = random.Next(1, 10);// 9>=a>=1 if (sb.Length < Digit) { sb.Append(i); } Nums -= 1; } return sb.ToString(); }
标签:style blog color os ar div sp log c
原文地址:http://www.cnblogs.com/yonguibe/p/3967969.html