RandomExtensions.AsParallel Method

Returns a thread-safe version of this random number generator.

Definition

Namespace: Extreme.Mathematics
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23
C#
public static ParallelRandom AsParallel(
	this Random random
)

Parameters

random  Random
A random number generator.

Return Value

ParallelRandom
A Random object that generates the same values as random, but is thread-safe.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Random. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

See Also