📜  随机类 - C# 代码示例

📅  最后修改于: 2022-03-11 14:49:20.584000             🧑  作者: Mango

代码示例3
Random rd = new Random(); //Create an instance of Random Class
int x = rd.Next(1,50);  //Generates a random number of int datatype between 1 and 50
Console.WriteLine(x); //Print the random number on Console