weird post and pre behavior (c++ and c#)
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/4176328/undefined-behavior-and-sequence-points">Undefined Behavior and Sequence Points</a>  </p>
</blockquote>



<p>i am wondering from the ending result between this 2 chunk of code one in c++ other in c#.
these two chunks give differents result which doesnt make any sense any explanation will be helpful.</p>

<pre><code>  //c++
  int x=0;
  x=x++ + ++x;// result=3

  //c#
  int x=0;
  x=x++ + ++x;// result=2 (logical answer)
</code></pre>
