如何生成一定范围内的随机数?
最佳答案
你可以试试
Random r = new Random();
int rInt = r.Next(0, 100); //for ints
int range = 100;
double rDouble = r.NextDouble()* range; //for doubles
看一下
Random Class,Random.Next Method (Int32, Int32)和Random.NextDouble Method
关于c# - 使用C#产生范围内的随机数,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/3975290/