예제 #1
0
 /// <summary>
 /// Shuffles an IEnumerable source.
 /// </summary>
 public IEnumerable <T> Shuffle <T>(IEnumerable <T> source)
 {
     return(source.OrderBy(_ => _randomizer.Int32()));
 }
예제 #2
0
 /// <summary>
 /// Gets a random character between <paramref name="min"/> and <paramref name="max"/>.
 /// </summary>
 /// <param name="min">The lowest char of the range to get (lower bound).</param>
 /// <param name="max">The highest char of the range to get (upper bound).</param>
 public char Char(char min = char.MinValue, char max = char.MaxValue)
 {
     return((char)_randomizer.Int32(min, max));
 }