title: Changing a flag based on a boolean
body: <p>Does any have a more elegant way of doing this? </p>
  
  <pre><code>[Flags]
  public enum SomeFlaggedEnum
  {
      Value1 = 1,
      Value2 = 2,
      Value3 = 4
  }
  
  
  private SomeFlaggedEnum _myFlags;
  
  public bool EnabledValue1
  {
      set 
      {
          if (value)
          {
              _myFlags |= SomeFlaggedEnum.Value1;
          }
          else
          {
              _myFlags &amp;= ~SomeFlaggedEnum.Value1;
          }
      }
  } 
  </code></pre>
  
  <p>I know there is probably a simple answer and I'm just way over thinking it...</p>
  
  <p>EDIT: The enum was incorrect as pointed out in one of the answers. This was only in this example and not in the actual code.</p>