Пример #1
0
        static void Main(string[] args)
        {
            int count = 0;

            foreach (var i in FibonacciGenerator.GenerateWithYield())
            {
                Console.WriteLine(i);
                if (count++ == 10)
                {
                    break;
                }
            }

            Console.ReadLine();
        }