Cuemon .NET Framework
GetRandomNumber(Int32) Method

The exclusive upper bound of the random number to be generated. maxValue must be greater than or equal to zero.
Generates a nonnegative random number less than the specified maximum.
Syntax
'Declaration
 
Public Overloads Shared Function GetRandomNumber( _
   ByVal maxValue As Integer _
) As Integer
public static int GetRandomNumber( 
   int maxValue
)

Parameters

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

Return Value

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.
Requirements

Target Platforms: Windows 8, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

NumberUtility Class
NumberUtility Members
Overload List

 

 


| Cuemon is licensed under a The MIT License (MIT)



© 2009-2015 Weubphoria. All Rights Reserved.

Documentation made easy with Document! X by Innovasys

Send Feedback