예제 #1
0
        public ByteRandomGenerator(byte from = byte.MinValue, byte to = byte.MaxValue)
        {
            if (from > to)
            {
                throw new ArgumentOutOfRangeException("Minimum should not be greater than maximum.");
            }

            _integerRandomGenerator = new IntegerRandomGenerator(from, to);
        }
예제 #2
0
        public ShortRandomGenerator(short from = short.MinValue, short to = short.MaxValue)
        {
            if (from > to)
            {
                throw new ArgumentOutOfRangeException("Minimum should not be greater than maximum.");
            }

            _integerRandomGenerator = new IntegerRandomGenerator(from, to);
        }