I have an enum with some members marked by custom attribute like:
public enum VideoClipTypeEnum : int
{
Exhibitions = 1,
TV = 2,
[ClipTypeDisplayAttribute(false)]
Content = 3
}
My attribute is:
public class ClipTypeDisplayAttribute : DescriptionAttribute
{
#region Private Variables
private bool _treatAsPublicType;
#endregion
#region Ctor
public ClipTypeDisplayAttribute(bool treatAsPublicType)
{
_treatAsPublicType = treatAsPublicType;
}
#endregion
#region Public Props
public bool TreatAsPublicType
{
get
{
return _treatAsPublicType;
}
set
{
_treatAsPublicType = value;
}
}
#endregion
}
What is the best way of getting the values of members marked with my custom attribute into List?