title: What is the effect of having an empty while loop?
body: <p>I know this might be a bit of a 'silly' question, but sometimes, I just want to loop until a condition is false but I don't like keeping the loop empty. So <em>instead of</em>:</p>
  
  <pre><code>Visible = true;
  while(IsRunning)
  {
  }
  Visible = false;
  </code></pre>
  
  <p>I usually <em>prefer</em>: </p>
  
  <pre><code>while(IsRunning)
  {
      Visible = true;
  }
  Visible = false;
  </code></pre>
  
  <p>However, I'm a bit concerned about what exactly happens at the line <code>Visible = true;</code>. Does the Runtime keep executing that statement even though it's <em>redundant</em>? Is it even <em>advisable</em> to do it this way? Many 'code-enhancements' plugins don't like empty while loops, and I don't really understand why.</p>
  
  <p><em><strong>SO:</em></strong></p>
  
  <ul>
  <li><p><strong>Is there anything wrong with having an empty while loop?</strong></p></li>
  <li><p><strong>Does having a loop such as shown above have any performance effects?</strong></p></li>
  </ul>
  
  <p>Thanks! </p>