Skip to main content
All docs
V24.2

NonCryptographicRandom Members

A random number generator.

Constructors

Name Description
NonCryptographicRandom(Int32) Initializes a new instance of the NonCryptographicRandom class with specified settings.

Properties

Name Description
Default static Gets an instance of NonCryptographicRandom initialized with a hard-coded seed.
System static Gets an instance of NonCryptographicRandom seeded by the system clock.

Methods

Name Description
Equals(Object, Object) static Determines whether the specified object instances are considered equal. Inherited from Object.
Equals(Object) Determines whether the specified object is equal to the current object. Inherited from Object.
GetHashCode() Serves as the default hash function. Inherited from Object.
GetType() Gets the Type of the current instance. Inherited from Object.
MemberwiseClone() protected Creates a shallow copy of the current Object. Inherited from Object.
Next() Returns a non-negative random integer.
Next(Int32, Int32) Returns a random integer within the specified range.
Next(Int32) Returns a non-negative random integer that is less than the specified maximum.
NextBytes(Byte[]) Fills the specified array with random bytes.
NextBytes(Int32) Returns a new byte array filled with random bytes.
NextDouble() Returns a random floating-point number that is greater than or equal to 0.0 and less than 1.0.
NextString(Int32) Generates a random alphanumeric string of the specified length.
ReferenceEquals(Object, Object) static Determines whether the specified Object instances are the same instance. Inherited from Object.
ToString() Returns a string that represents the current object. Inherited from Object.
See Also