Why does this simple method not work?
<p>It must be simple, but i can't seem to find the explanation. Why does the following generates these errors:</p>

<ol>
<li>Unreachable code detected  (on result++) </li>
<li><p>WindowsFormsApplication1.Form1.GetResult(int, int): not all code paths return a value</p>

<pre><code>private int GetResult(int start, int end)
{
    for (int result = start; result &lt; end; result++)
    {
        return result;
    } 
}
</code></pre></li>
</ol>

<p>Anyone who could please help me out? Thnx in advance :)</p>

<p><strong>EDIT:</strong>
First of all, thanks for the many (fast) replys. Stupid of mine...but i didn't see it.</p>

<p>And sorry, i needed to be a little more precise of what it is i wanted to accieve..
I need a method that adds 1 to a value (result) starting from the given start value (int start) untill it reaches another value (int end).
So it might also add directly to start integer if I’m not mistaking. And return that value?</p>
