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

Name
Description

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

Name
Description

size int

The array size.

Returns

Name
Description

A byte[] array filled with random values.

Exceptions

Name
Description

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

Double()

Gets the double.

public double Double()

Returns

Name
Description

A double.

Fill(byte[], int, int)

Fills random array of bytes.

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

Parameters

Name
Description

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

Name
Description

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

Name
Description

A double.

Int(int, int)

Ints.

public double Int(int min, int max)

Parameters

Name
Description

min int

The minimum.

max int

The maximum.

Returns

Name
Description

A double.

Long()

Gets the long.

public long Long()

Returns

Name
Description

A long.

Seed(int)

Change random seed.

public void Seed(int seed)

Parameters

Name
Description

seed int

The seed.

String(int)

Generates a random string.

public string String(int length)

Parameters

Name
Description

length int

The length.

Returns

Name
Description

A string.

Exceptions

Name
Description

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

Last updated