Exemplo n.º 1
0
        public object Generate()
        {
            var       returnValue   = new List <char>();
            var       charGenerator = new CharGenerator();
            const int amount        = 5;

            for (var i = 0; i < amount; i++)
            {
                returnValue.Add((char)charGenerator.Generate());
            }

            return(returnValue);
        }
Exemplo n.º 2
0
        public object Generate()
        {
            const int maxLength = 42;

            //var random = new Random();
            var length        = _random.Next(0, maxLength + 1);
            var result        = "";
            var charGenerator = new CharGenerator();

            for (var i = 0; i < length; i++)
            {
                var character = (char)charGenerator.Generate();
                result += character;
            }
            return(result);
        }