System.Random.NextNonNegativeDecimal()

Here are the examples of the csharp api System.Random.NextNonNegativeDecimal() taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

1 Examples 7

19 Source : RandomExtensions.cs
with MIT License
from dotnet-toolbelt

public static decimal NextDecimal(this Random @this, decimal maxValue)
        {
            return @this.NextNonNegativeDecimal() / decimal.MaxValue * maxValue;
            ;
        }