title: How to get attributes of enum
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/1799370/getting-attributes-of-enums-value">Getting attributes of Enum’s value</a>  </p>
  </blockquote>
  
  
  
  <p>This is my class:</p>
  
  <pre><code>[AttributeUsage(AttributeTargets.Field)]
  public sealed class LabelAttribute : Attribute
  {
  
      public LabelAttribute(String labelName)
      {
          Name = labelName;
      }
  
      public String Name { get; set; }
  
  }
  </code></pre>
  
  <p>and I want to get the fields of the attributes:</p>
  
  <pre><code>public enum ECategory
  {
      [Label("Safe")]
      Safe,
      [Label("LetterDepositBox")]
      LetterDepositBox,
      [Label("SavingsBookBox")]
      SavingsBookBox,
  }
  </code></pre>