FastRandom.Next Method

GeneticSharp

FastRandom Next Method GeneticSharp
Overload List

  Name Description
Public method Next 
Generates a random int over the range 0 to int.MaxValue-1. MaxValue is not generated in order to remain functionally equivalent to System.Random.Next(). This does slightly eat into some of the performance gain over System.Random, but not much. For better performance see: Call NextInt() for an int over the range 0 to int.MaxValue. Call NextUInt() and cast the result to an int to generate an int over the full Int32 value range including negative values.
Public method Next(Int32)
Generates a random int over the range 0 to upperBound-1, and not including upperBound.
Public method Next(Int32, Int32)
Generates a random int over the range lowerBound to upperBound-1, and not including upperBound. upperBound must be >= lowerBound. lowerBound may be negative.
Back to Top
See Also