Why the increment of an integer on C# is executed after a function return its value?
<p>Why this two functions return different values? </p>

<p>When I call this function passing 0 as parameter it returns 1</p>

<pre><code>public static int IncrementByOne(int number)
{
    return (number + 1);
}
</code></pre>

<p>However, when I call this function passing 0 as parameter it returns 0 even though the increment is executed and the number variable changes its value to 1 inside the method?</p>

<pre><code>public static int IncrementByOne(int number)
{
    return number++;
}
</code></pre>

<p>What is the reason why the returned values of this two functions are different? </p>