Table of Contents

Class ThreadSafeRandom

Namespace
CodeStage.AntiCheat.Utils
Assembly
Build.dll

Random utility which can be used from background threads.

public static class ThreadSafeRandom
Inheritance
object
ThreadSafeRandom

Methods

Next(int, int)

Generates random int number within specified range.

public static int Next(int minInclusive, int maxExclusive)

Parameters

minInclusive int

Minimal value, inclusive.

maxExclusive int

Maximum value, exclusive.

Returns

int

Random value in specified range.

NextBytes(byte[])

Fills passed buffer with random bytes.

public static void NextBytes(byte[] buffer)

Parameters

buffer byte[]

Buffer filled with random bytes.

NextChars(char[])

Fills passed buffer with random char values.

public static void NextChars(char[] buffer)

Parameters

buffer char[]

Buffer filled with random char values.

NextLong(long, long)

Generates random long number within specified range.

public static long NextLong(long minInclusive, long maxExclusive)

Parameters

minInclusive long

Minimal value, inclusive.

maxExclusive long

Maximum value, exclusive.

Returns

long

Random value in specified range.