This is not exclusive, and MSDN does not state that it is. Well, well, he uses the word βexclusiveβ when it comes to maxValue , which is less clear, but the reality is that in the vast majority of cases it really is exclusive, as expected.
However, there are some angular cases: to be specific with examples, Next(0) returns 0 ; Next(4,4) returns 4 . It is enabled if it does not have an option, and this is described in the "Return Value" section on MSDN:
For a quote from Next(maxValue) :
However, if maxValue is zero, maxValue is returned.
and Next(minValue,maxValue) :
If minValue is equal to maxValue, minValue is returned.
(which, of course, could be said: " maxValue returned")
In both cases, a return of maxValue .
The one exception is the parameter without Next() parameters, which is documented as strictly < int.MaxValue .
source share