.NET 4.0 refactoring for yield return
<p>How can the yield return be refactored in .NET 4.0</p>

<pre><code>public static void DoIt()
{
    foreach (int n in Power(2,4))
    {
        Console.Write(n);
    }
}


public static IEnumerable CalcPower(int base, int exponent)
{
    int res = 1;

    for (int c = 1; c &lt;= high; counter++)
    {
        res = res * base;
        yield return result;
    }
}
</code></pre>
