title: How to apply InterLocked.Exchange for Enum Types in C#?
body: <pre><code>public enum MyEnum{Value1, Value2}  
  class MyClass 
  { 
      private MyEnum _field;   
      public MyEnum Field  // added for convenience
      {
          get { return _field; }  
          set { Interlocked.Exchange(ref _field, value); // ERROR CS0452  }
      }  
  } 
  </code></pre>
  
  <p>could be solved with:</p>
  
  <pre><code> public enum MyEnum{Value1, Value2}  
   public class MyClass2  
   {  
     private int _field;  //change to int
     public MyEnum Field  // added for convenience
     { 
      get { return (MyEnum)_field; }
      set { System.Threading.Interlocked.Exchange(ref _field, (int)value); }
     }  
   }
  </code></pre>
  
  <p>Is there any better way for this problem?</p>