Bewerken

Delen via


SafeRandom Class

Definition

Thread-safe random number generator. Has same API as System.Random but is thread safe, similar to the implementation by Steven Toub: http://blogs.msdn.com/b/pfxteam/archive/2014/10/20/9434171.aspx

public class SafeRandom
type SafeRandom = class
Public Class SafeRandom
Inheritance
SafeRandom

Constructors

SafeRandom()

Methods

Next()
Next(Int32, Int32)
Next(Int32)
NextBytes(Byte[])
NextDouble()

Extension Methods

NextTimeSpan(SafeRandom, TimeSpan, TimeSpan)
NextTimeSpan(SafeRandom, TimeSpan)

Applies to