小编Vah*_*d.m的帖子

我的代码运行多长时间?

我怎样才能知道我的C#代码运行了多长时间?

c# performance benchmarking

9
推荐指数
3
解决办法
6751
查看次数

特殊随机数

我想要一个这样的随机数:(在C#中)

Random r = new Random();
r.next (0,10)
Run Code Online (Sandbox Code Playgroud)

但重要的是随机数更接近8,(或通常很大),我的意思是如果我们使用a:

for (int i =0; i<...;i++)
{
  write: r.next (0,10)
}
Run Code Online (Sandbox Code Playgroud)

结果是这样的;

8 7 6 9 1 0 5 3 2
2 3 8 9 7 7 6 2 3
8 8 9 7 2 8 2 8 4
3
Run Code Online (Sandbox Code Playgroud)

c# random numbers

7
推荐指数
2
解决办法
1336
查看次数

标签 统计

c# ×2

benchmarking ×1

numbers ×1

performance ×1

random ×1