Fibonacci Using an Iterator in C#

Here's an interesting way to compute the Fibonacci Sequence up to a given number and avoiding the recursive implementation.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace FibonacciUsingIterator
{
    class ComputeFibonacci
    {
        static void Main(string[] args)
        {
            long result = 0;

            foreach (int n in Fibonacci().TakeWhile(n => n < 40000))
            {
                result += n;
                Console.WriteLine(n.ToString() + ": " + result);
            }

            Console.ReadLine();
        }

        static IEnumerable<int> Fibonacci()
        {
            int n1 = 0;
            int n2 = 1;

            yield return 1;

            while (true)
            {
                int n = n1 + n2;

                n1 = n2;
                n2 = n;

                yield return n;
            }
        }

    }
}