title: Check if enum is obsolete
body: <p>How can I check if an <code>enum</code> if marked as obsolete?</p>
  
  <pre><code>public enum MyEnums
  {
      MyEnum1,
      [Obsolete("How can you know that I'm obsolete?")]
      MyEnum2,
      MyEnum3
  }
  </code></pre>
  
  <p>Now at runtime, I need to know which ones are obsolete:</p>
  
  <pre><code>foreach (var myEnum in Enum.GetValues(typeof(MyEnums)).Cast&lt;MyEnums&gt;())
  {
      // How can I check if myEnum is obsolete?
  }
  </code></pre>