//随机数实例
System.Random rand = new System.Random(unchecked((int)DateTime.Now.Ticks));
for (int i = 0; i < codecount; i++)
{
//获取一个随机数
int t = rand.Next(allchararray.Length);
//合成随机字符串
randomcode += allchararray[t];
}
return randomcode;
}

}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head ;

//随机数实例
System.Random rand = new System.Random(unchecked((int)DateTime.Now.Ticks));
for (int i = 0; i < codecount; i++)
{
//获取一个随机数
int t = rand.Next(allchararray.Length);
//合成随机字符串
randomcode += allchararray[t];
}
return randomcode;
}

}

相关文章:

  • 2022-12-23
  • 2021-09-09
  • 2021-12-30
  • 2021-11-12
  • 2022-12-23
  • 2021-11-21
  • 2022-01-11
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-11-12
  • 2021-08-01
  • 2021-10-23
  • 2022-12-23
相关资源
相似解决方案