日期:2014-05-17 浏览次数:20405 次
#region 自定义-调用函数产生4个随机数字及字母组合
private static object[] CreateNumCode(int n)
{
string strchar = "2,3,4,5,6,7,8,9,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,T,U,V,W,X,Y,Z";
string[] VcArray = strchar.Split(',');
Random rdm = new Random();
object[] bytes = new object[n];
int e = -1;
for (int i = 0; i < n; i++)
{
e = rdm.Next(VcArray.Length);
if (e != -1)
{
bytes.SetValue(VcArray[e].ToString(), i);
}
}
return bytes;
}