C#生成一串包含字符和数字的随机数

数字:

Random rdm 
= new Random();
int b = rdm.Next(0,100);  //从0到100的随机数


包含数字和字符的随机数:
Guid.NewGuid().ToString().Substring(0,位数)//Guid 的值均为零或者等于任何其他 Guid 的可能性非常小。




原文地址:https://www.cnblogs.com/jackrebel/p/1085891.html