I have an enumeration for Status for a Task. Some of the statuses are considered obsolete, and I have marked them as obsolete, as seen below:
public enum TaskStatus
{
[Description("")]
NotSet = 0,
Pending = 1,
Ready = 2,
Open = 3,
Completed = 4,
Closed = 5,
[Description("On Hold")][Obsolete]
OnHold = 6,
[Obsolete]
Canceled = 7
}
In my user interface I populate a drop down with values on the enumerations, but I want to ignore ones that are marked as obsolete. How would I got about doing this?