生成指定个随机字符串--我个人认为基本不会重复(测试时使用6位未见重复现象,完满通过)

///

1<summary>   
2/// 根据指定个数和生成指定长度的随机字符串   
3/// </summary>

///

1<param name="Count"/>

指定个数
///

1<param name="Length "/>

指定长度
string[] MakeString( int Count, int Length )
{
string[] strReturn = new string[Count];
Random Rnd = new Random();

for( int i = 0; i < Count; i++ )
{
string strPassword = Just.Auto.Common.Function.RndString( Length, Rnd.Next() );
strReturn[i] = strPassword;
}
}

Published At
Categories with Web编程
Tagged with
comments powered by Disqus