Exemple #1
0
        static void Main(string[] args)
        {
            var FizzBuzz = new FizzBuzz();
            var list = new List<NumericObject>()
                {
                    new NumericObject() {Number = 6},
                    new NumericObject() {Number = 10},
                    new NumericObject() {Number = 37},
                    new NumericObject() {Number = 15}
                };

            foreach (var item in list)
            {
                var result = FizzBuzz.ProcessItem(item, 3, 5);
                if (!string.IsNullOrEmpty(result))
                {
                    Console.WriteLine(result);
                }
            }
            foreach (var log in FizzBuzz.Print())
            {
                Console.WriteLine(log);
            }

            Console.ReadKey();
        }
Exemple #2
0
 public void Init()
 {
     fizzBuzz = new FizzBuzz();
 }