C#中怎么获取1到100的随机数?

来源:学生学帮网 编辑:学帮网 时间:2024/06/16 08:19:48

C#中怎么获取1到100的随机数?

Random randow = new Random(); Console.WriteLine(randow.Next(100)+1);