Below is my Enumerator List
:
public enum StatusEnum
{
Open = 1,
Rejected = 2,
Accepted = 3,
Started = 4,
Completed = 5,
Canc
Well if you're going to hard code the items that should be in the list anyway, why not just do this:
public static List StatusList()
{
return new List
{
Activity.StatusEnum.Open,
Activity.StatusEnum.Rejected,
Activity.StatusEnum.Accepted,
Activity.StatusEnum.Started
};
}
You could also dispose of the List
and just return the array itself. As long as you know these are the items you want, then there's no need for Linq.