ThreadSafeRandomInstance Property

Gets a ThreadSafeRandom instance that can be used from any threads concurrently.

Definition

Namespace: KGySoft.CoreLibraries
Assembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 9.0.0-preview.1
C#
public static ThreadSafeRandom Instance { get; }

Property Value

ThreadSafeRandom

Remarks

  Caution

Starting with .NET 6.0 the base Random class has a Shared property, which is accessible also from the ThreadSafeRandom class, though it uses a somewhat slower algorithm internally.

See Also