![]()
A 32-bit signed integer greater than or equal to minValue and less than maxValue; that is, the range of return values includes minValue but not maxValue. If minValue equals maxValue, minValue is returned.
Type Reason ArgumentOutOfRangeException minValue is greater than maxValue.
Unlike the other overloads of the Random.Next method, which return only non-negative values, this method can return a negative random integer.