C#中如何产生一个0~100的随机数?

2024-12-17 02:08:03
推荐回答(1个)
回答1:

using System;

class Program
{
static void Main(string[] args)
{
Random rd = new Random();

int num = rd.Next(0,100);

}
}