c# foreach looping even number
<p>I have the following <code>foreach</code> loop in C#:</p>

<pre><code>foreach(var item in mod)
{
    int i;

    i = i + 1;
    if (i % 2 == 0)
    { 
        string y = "even number"; 
    }
}
</code></pre>

<p>How come I get the message that local variable is unassigned. I am trying to find the even number here.</p>
