lundi 31 août 2015

C# - How to get the name of an interface Property/Func/Action, in a strongly type way?

Problem description

Assuming you have an interface / class, and wish to get a Property/Func/Action name, how and what is the best practice to do so?

e.g. given:

public interface IConvertible
{    
    // ...
    bool ToBoolean(IFormatProvider provider);
    // ...
}

How to get 'ToBoolean' name strongly timed fashion?





Aucun commentaire:

Enregistrer un commentaire