NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Random.Sample

Returns a random number that is between 0 and 1.

[Visual Basic]
Overridable Protected Function Sample() As Double
[C#]
protected virtual double Sample();
[C++]
protected: virtual double Sample();
[JScript]
protected function Sample() : double;

Return Value

An 8-byte double-precision number that is greater than or equal to 0.0 and less than 1.0. (0.0 < x < 1.0).

Exceptions

Exception Type Condition
ArgumentNullException if value is null.

Remarks

When you subclass Random, you can override this method to produce different distributions.

See Also

Random Class | Random Members | System Namespace