You can use
Return: A 32-bit signed integer greater than or equal to zero, and less than maxValue; that is, the range of return values ordinarily includes zero but not maxValue. However, if maxValue equals zero, maxValue is returned.
var r =newRandom();// print random integer >= 0 and < 100
For this case however you could use
Random.Next(int minValue, int maxValue), like this:// print random integer >= 1 and< 101
Programmer123, if this helps please login to Mark As Answer. | Alert Moderator
Console.WriteLine(r.Next(1,101);)// or perhaps (if you have this specific case)