title: Is it possible to share an enum declaration between C# and unmanaged C++?
body: <p>Is there a way to share an enum definition between native (unmanaged) C++ and (managed) C#?</p>
  
  <p>I have the following enum used in completely unmanaged code:</p>
  
  <pre><code>enum MyEnum { myVal1, myVal2 };
  </code></pre>
  
  <p>Our application sometimes uses a managed component.  That C# component gets the enum item values as ints via a managed C++ interop dll (from the native dll). (The interop dll only loads if the C# component is needed.)  The C# component has duplicated the enum definition:</p>
  
  <pre><code>public enum MyEnum { myVal1, myVal2 };
  </code></pre>
  
  <p>Is there a way to eliminate the duplication without turning the native C++ dll into a managed dll?</p>