(Action<T>).Name does not return expected values
- by Tomas Lycken
I have the following method (used to generate friendly error messages in unit tests):
protected string MethodName<TTestedType>(Action<TTestedType> call)
{
return string.Format("{0}.{1}", typeof(TTestedType).FullName, call.Method.Name);
}
But when I call it as follows, I don't get the expected results:
var nm =…