Example #1
0
        public static string String(this System.Random random, int length)
        {
            var chars = random.Chars(length);

            return(new string(chars));
        }
Example #2
0
 public static string PostCode(this System.Random random) =>
 $"{new string(random.Chars(2))}{random.Digits(2)} {random.Digit()}{new string(random.Chars(2))}"
 .ToUpperInvariant();