Possible Duplicate:
Getting attributes of Enum’s value
This is my class:
[AttributeUsage(AttributeTargets.Field)]
public sealed class LabelAttribute : Attribute
{
public LabelAttribute(String labelName)
{
Name = labelName;
}
public String Name { get; set; }
}
and I want to get the fields of the attributes:
public enum ECategory
{
[Label("Safe")]
Safe,
[Label("LetterDepositBox")]
LetterDepositBox,
[Label("SavingsBookBox")]
SavingsBookBox,
}