title: What's the difference between X = X++; vs X++;?
body: <p>Have you ever tried this before?</p>
  
  <pre><code>static void Main(string[] args)
  {
      int x = 10;
      x = x++;
      Console.WriteLine(x);
  }
  </code></pre>
  
  <p>Output: 10.</p>
  
  <p>but for </p>
  
  <pre><code>static void Main(string[] args)
  {
      int x = 10;
      x++;
      Console.WriteLine(x);
  }
  </code></pre>
  
  <p>Output: 11.</p>
  
  <p>Could anyone explain why this?</p>