title: Is a bool read/write atomic in C#
body: <p>Is accessing a <strong>bool</strong> field atomic in C#? In particular, do I need to put a lock around:</p>
  
  <pre><code>class Foo
  {
     private bool _bar;
  
     //... in some function on any thread (or many threads)
     _bar = true;
  
     //... same for a read
     if (_bar) { ... }
  }
  </code></pre>