FastRandomSampleInt32 Method

Returns a random Int32 can have any value.

Definition

Namespace: KGySoft.CoreLibraries
Assembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 10.0.0
C#
public int SampleInt32()

Return Value

Int32
A 32-bit signed integer that is greater than or equal to Int32.MinValue and less or equal to Int32.MaxValue.

Remarks

Similarly to the Next and NextInt32 methods this one returns an Int32 value; however, the result can be negative and the maximum possible value can be Int32.MaxValue.

The RandomExtensions.SampleInt32(Random) extension method has the same functionality but it is faster to call this one directly.

See Also