Cuemon .NET Framework
GetRandomNumber(Int32,Int32,RandomSeverity) Method

The inclusive lower bound of the random number returned.
The exclusive upper bound of the random number returned. maxValue must be greater than or equal to minValue.
The severity of the random number being generated.
Generates a random number within a specified range.
Syntax
'Declaration
 
Public Overloads Shared Function GetRandomNumber( _
   ByVal minValue As Integer, _
   ByVal maxValue As Integer, _
   ByVal severity As RandomSeverity _
) As Integer
public static int GetRandomNumber( 
   int minValue,
   int maxValue,
   RandomSeverity severity
)

Parameters

minValue
The inclusive lower bound of the random number returned.
maxValue
The exclusive upper bound of the random number returned. maxValue must be greater than or equal to minValue.
severity
The severity of the random number being generated.

Return Value

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.
Exceptions
ExceptionDescription
System.ArgumentOutOfRangeExceptionminValue is greater than maxValue
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