随机数
来源:互联网 发布:淘宝 鹰眼 开源 编辑:程序博客网 时间:2024/05/11 09:02
private static char[] constant = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9' };
/// <summary>
/// 生成随机数 数字和字符
/// </summary>
public static string GetRandomStr(int strLength)
{
System.Text.StringBuilder newRandom = new System.Text.StringBuilder(10);
Random rd = new Random();
for (int i = 0; i < strLength; i++)
{
newRandom.Append(constant[rd.Next(10)]);
}
return newRandom.ToString();
}
/// <summary>
/// 生成随机数 数字和字符
/// </summary>
public static string GetRandomStr(int strLength)
{
System.Text.StringBuilder newRandom = new System.Text.StringBuilder(10);
Random rd = new Random();
for (int i = 0; i < strLength; i++)
{
newRandom.Append(constant[rd.Next(10)]);
}
return newRandom.ToString();
}
- 随机数
- 随机数
- 随机数。。。
- 随机数
- 随机数
- 随机数
- 随机数
- 随机数
- 随机数
- 随机数
- 随机数
- 随机数
- 随机数
- 随机数
- 随机数
- 随机数
- 随机数
- 随机数
- jsp页面转换成htm页面
- WinCE中支持多国语言切换
- 一个思考中的查询语言
- good links to good website
- /保护型数据在派生类中遇到的小问题
- 随机数
- 关于const关键字作用范围和使用效果
- 测试自动gengxin
- 读取excel数据
- 关于static的相关讨论:
- java操作Excel、PDF文件
- [总结]获得控件的方法
- Apache故障
- LINQ to SQL系列Part 5 - Binding UI using the ASP:LinqDataSource Control