Possible Duplicate:
Enumeration extension methods
I have a situation where i would like to add an extension
to a couple of my Enumerators for quick extraction of information. already wrote a static method to do this as a helper method but was wondering if it was possible to also short it as an extension?
signature as it is now, again not sure its possible. Just pushing my knowledge threshold and boundaries ;)
public static string EnumString( this Type par , object val ) {
return Enum.GetName( typeof( par ) , val );
}