Returns a psuedo-random positive number less than the specified maximum.
- maxValue
- The upper bound of the random number to be generated. maxValue is required to be greater than or equal to zero.
A int set to a psuedo-random value greater than or equal to zero and less than maxValue. If maxValue is zero, returns zero.
Type Reason ArgumentOutOfRangeException maxValue is less than zero.
Operation
As described above.Note to Inheritors
Override this method to customize the algorithm used to generate the return value.Usage
Use this method to generate a psuedo-random number less than the specified maximum value.
Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0