コード例 #1
0
        public override string SetOfNumber()
        {
            StringBuilder sb = new StringBuilder();

            FlashedNumbers.ForEach(x => sb.AppendFormat("{0},", x));
            return(sb.ToString().TrimEnd(','));
        }
コード例 #2
0
        public override string GenerateNextNumber()
        {
            int nextNumber = _randomgenerator.Next(MinNumber, MaxNumber);

            FlashedNumbers.Add(nextNumber);
            return(nextNumber.ToString());
        }
コード例 #3
0
        public override string CalculateResult()
        {
            long product = 1;

            FlashedNumbers.ForEach(x => product *= x);
            return(product.ToString());
        }
コード例 #4
0
        public override string GenerateNextNumber()
        {
            int    nextNumber = _randomgenerator.Next((int)MinNumber, (int)MaxNumber);
            double precision  = nextNumber + _randomgenerator.NextDouble();

            FlashedNumbers.Add(precision);
            return(precision.ToString("N2"));
        }
コード例 #5
0
 public override string CalculateResult()
 {
     return(FlashedNumbers.Sum().ToString());
 }