Trying to mimic this post: Create Generic method constraining T to an Enum
public static string[] ToTextArray(this Dictionary<string, T> dictionary) where T:struct, IConvertible
{
...
}
It appears my T
cannot be resolved. What is the correct way to write an extension method for all Dictionary<string, enum_type>
classes?