Share via


Random.Next Method (Int32)

Returns a nonnegative random number that is less than the specified maximum.

Namespace: System
Assembly: mscorlib (in mscorlib.dll)

Syntax

[MethodImplAttribute(InternalCall)]
public virtual int Next (
         int maxValue
)

Parameters

  • maxValue
    The exclusive upper bound of the random number to be generated. Must be greater than or equal to zero.

Return Value

A 32-bit signed integer that is greater than or equal to zero and less than maxValue.

Version Information

Available in the .NET Micro Framework version 4.1 and 4.2.

See Also

Reference

Random Class
Random Members
System Namespace