title: Why can't I use an integer as a condition for a while loop in C#?
body: <p>I am getting an error when using the while loop shown below, and I don't understand why:</p>
  <pre><code>int count = 5;
  while(count--)    //here showing an error
  {
      Console.WriteLine(&quot;Number : {0}&quot;, count);
  }
  </code></pre>
  <p>However, in C, the code works properly. I am a little bit confused about why I am getting this error. Can anyone explain why?</p>
  <p>Thanks, for your invaluable time.</p>