RandomNumber Class

Summary

Provides access to random number generator.
Namespace
Faker
Base Types
  • object
graph TD Base0["object"]-->Type Type["RandomNumber"] class Type type-node

Syntax

public static class RandomNumber

Remarks

This is just a convenience class and is just wrapping System.Random.

Methods

Name Value Summary
Next() int
Returns a non-negative random integer
static
Next(int) int
Returns a non-negative random integer that is less than the specified maximum.
static
Next(int, int) int
Returns a random integer that is within a specified range.
static
Next(long, long) long
Returns a random integer that is within a specified range.
static
NextBytes(byte[]) void
Fills the elements of a specified array of bytes with random numbers.
static
NextDouble() double
Returns a random floating-point number that is greater than or equal to 0.0, and less than 1.0.
static
ResetSeed(int) void
Initializes a new instance of the System.Random class, using the specified seed value.
static

See Also

  • System.Random
GitHub