Rnd

Namespace: Babel.Licensing Assembly: Babel.Licensing.dll

A random. This class cannot be inherited.

public sealed class Rnd

Inheritance

objectRnd

Inherited Members

object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Constructors

Rnd()

Default constructor.

public Rnd()

Rnd(int)

Constructor.

public Rnd(int seed)

Parameters

NameDescription

seed int

The seed used to generate dandom values.

Fields

Alphabet

The alphabet.

public static string Alphabet

Field Value

string

Methods

Array(int)

Generates a random array of bytes.

public byte[] Array(int size)

Parameters

NameDescription

size int

The array size.

Returns

NameDescription

A byte[] array filled with random values.

Exceptions

NameDescription

Thrown when one or more arguments are outside the required range.

Double()

Gets the double.

public double Double()

Returns

NameDescription

A double.

Fill(byte[], int, int)

Fills random array of bytes.

public void Fill(byte[] array, int start, int count)

Parameters

NameDescription

array byte[]

The array.

start int

The start index where to start fill random values.

count int

The number of random values to generate.

Exceptions

NameDescription

Thrown when one or more required arguments are null.

Thrown when one or more arguments are outside the required range.

Int()

Ints.

public double Int()

Returns

NameDescription

A double.

Int(int, int)

Ints.

public double Int(int min, int max)

Parameters

NameDescription

min int

The minimum.

max int

The maximum.

Returns

NameDescription

A double.

Long()

Gets the long.

public long Long()

Returns

NameDescription

A long.

Seed(int)

Change random seed.

public void Seed(int seed)

Parameters

NameDescription

seed int

The seed.

String(int)

Generates a random string.

public string String(int length)

Parameters

NameDescription

length int

The length.

Returns

NameDescription

A string.

Exceptions

NameDescription

Thrown when one or more arguments are outside the required range.

Last updated