Next Method

Lidgren.Network

Collapse imageExpand ImageCopy imageCopyHover image

Overload List

  NameDescription
Public methodNext()()()()
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 methodNext(Int32)
Generates a random int over the range 0 to upperBound-1, and not including upperBound.
Public methodNext(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.

See Also