Attributes can be useful for denoting metadata on enums. Getting the value of this can be slow, so it is important to cache results.
private static Dictionary<object, object> attributeCache = new Dictionary<object, object>();
public static T GetAttribute<T, V>(this V va...