IRandomGenerator Interface

Namespace
TCLite.Interfaces
graph BT Type["IRandomGenerator"] class Type type-node

Syntax

public interface IRandomGenerator

Methods

Name Value Summary
GetString(int, string) string
Returns a random string of the specified length, made up of the characters specified.
GetString(int) string
Returns a random string of the specified length, made up of upper and lower case letters, digits and the underscore character.
Next() int
Returns a random int.
Next(int, int) int
Returns a random int within a specified range.
Next(int) int
Returns a random int less than the specified maximum.
NextBool() bool
Returns a random bool, with 50% probability of being true.
NextBool(double) bool
Returns a random bool, with the specified probablility of being true.
NextByte() byte
Returns a random byte.
NextByte(byte, byte) byte
Returns a random byte within a specified range.
NextByte(byte) byte
Returns a random byte less than the specified maximum.
NextDecimal() decimal
Returns a random decimal.
NextDecimal(decimal, decimal) decimal
Returns a random decimal within a specified range.
NextDecimal(decimal) decimal
Returns a random decimal less than the specified maximum.
NextDouble() double
Returns a random double.
NextDouble(double, double) double
Returns a random double within a specified range.
NextDouble(double) double
Returns a random double less than the specified maximum.
NextEnum(Type) object
Returns a random enum of the specified Type.
NextEnum<T>() T
Returns a random enum of the specified Type.
NextFloat() float
Returns a random float.
NextFloat(float, float) float
Returns a random float within a specified range.
NextFloat(float) float
Returns a random float less than the specified maximum.
NextGuid() Guid
Returns a random Guid.
NextLong() long
Returns a random long.
NextLong(long, long) long
Returns a random long within a specified range.
NextLong(long) long
Returns a random long less than the specified maximum.
NextSByte() sbyte
Returns a random sbyte.
NextSByte(sbyte, sbyte) sbyte
Returns a random sbyte within a specified range.
NextSByte(sbyte) sbyte
Returns a random sbyte less than the specified maximum.
NextShort() short
Returns a random short.
NextShort(short, short) short
Returns a random short within a specified range.
NextShort(short) short
Returns a random short less than the specified maximum.
NextUInt() uint
Returns a random unsigned int.
NextUInt(uint, uint) uint
Returns a random unsigned int within a specified range.
NextUInt(uint) uint
Returns a random unsigned int less than the specified maximum.
NextULong() ulong
Returns a random unsigned long.
NextULong(ulong, ulong) ulong
Returns a random unsigned long within a specified range.
NextULong(ulong) ulong
Returns a random unsigned long less than the specified maximum.
NextUShort() ushort
Returns a random unsigned short.
NextUShort(ushort, ushort) ushort
Returns a random unsigned short within a specified range.
NextUShort(ushort) ushort
Returns a random unsigned short less than the specified maximum.