I am trying to create an extension method that will return a List containing all the Description attributes for only the set values o
This is a compact solution using LINQ which also checks for null in case not all of the values have attributes:
public static List GetFlagEnumAttributes(this Enum flagEnum) where T : Attribute
{
var type = flagEnum.GetType();
return Enum.GetValues(type)
.Cast()
.Where(flagEnum.HasFlag)
.Select(e => type.GetMember(e.ToString()).First())
.Select(info => info.GetCustomAttribute())
.Where(attribute => attribute != null)
.ToList();
}