title: Faster assignment or check for bool values
body: <p>The question is simple, which is faster between CalledOften1 and CalledOften2</p>
  
  <pre><code>    class MyTest
      {
          public bool test = false;
          void CalledOften1()
          {
              if (!test) test = true;
              DoSomething();
          }
          void CalledOften2()
          {
              test = true;
              DoSomething();
          }
      }
  </code></pre>
  
  <p>Is the compiler optimized (if possible) to avoid future assignments of test if it's already true?</p>
  
  <p><strong>UPDATE:</strong>
  This question is just an information,  I will not use the if (bla) style if I can write test=true, I prefer code readability.</p>