Example #1
0
 public static int GetRandomNumberBetween(int min = 0, int max = 100)
 {
     var x = new CryptoRandom();
     if (min > max)
         throw new ArgumentOutOfRangeException(min.ToString() + ">" + max.ToString());
     return x.Next(min, max);
 }
Example #2
0
 public static long GetRandomLongBetween(long min = 0, long max = 999999999999999)
 {
     var x = new CryptoRandom();
     return x.NextLong(min, max);
 }