ThreadSafeRandomCreate(Int32) Method

Creates a ThreadSafeRandom instance using the specified seed value.

Definition

Namespace: KGySoft.CoreLibraries
Assembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 8.1.0
C#
public static ThreadSafeRandom Create(
	int seed
)

Parameters

seed  Int32
A number used to calculate a starting value for the pseudo-random number sequence.

Return Value

ThreadSafeRandom
A ThreadSafeRandom instance using the specified seed value.

Remarks

Make sure the created instance is disposed if it is not used anymore.

  Note

Please note that two generated sequences can be different even with the same starting seed if the created instance is accessed from different threads.

See Also