asp.net.ph

Random Class

System Namespace


Represents a pseudo-random number generator, a device that produces a sequence of numbers that meet certain statistical requirements for randomness.

Random Class Members

Collapse   Constructors

Visibility Constructor Parameters
public Random ( )
public Random ( Int32 Seed )

Collapse   Methods

Visibility Name Parameters Return Type
public Next ( Int32 maxValue ) Int32
public Next ( ) Int32
public Next ( Int32 minValue , Int32 maxValue ) Int32
public NextBytes ( Byte buffer ) Void
public NextDouble ( ) Double
protected Sample ( ) Double

Remarks

Pseudo-random numbers are chosen with equal probability from a finite set of numbers. The chosen numbers are not completely random because a definite mathematical algorithm is used to select them, but they are sufficiently random for practical purposes.

The random number generation starts from a seed value. If the same seed is used repeatedly, the same series of numbers is generated. One way to produce different sequences is to make the seed value time-dependent, thereby producing a different series with each new instance of Random.

Skip Navigation Links



Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph