I have Enum
public enum ContentMIMEType
{
[StringValue("application/vnd.ms-excel")]
Xls,
[StringValue("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet")]
Xlsx
}
In extensions I have 2 methods to get attribute value:
public static string GetStringValue<TFrom>(this TFrom enumValue)
where TFrom : struct, IConvertible
{
...
}
and
public static string GetStringValue(this Enum @enum)
{
...
}
These methods have different signature, but when I execute next operation ContentMIMEType.Xlsx.GetStringValue()
1st method is taken.
Why this happens, cause execution of 2nd method for me is more obvious (have tried to change sort order, but doens't help).