Hi i have method getting the name of calling method:
public static string GetMethodName()
{
System.Diagnostics.StackTrace trace = new System.Diagnostics.StackTrace();
return trace.GetFrame(1).GetMethod().Name;
}
And when I track my bugs and exceptions I always get method name .ctor how to avoid that or at least get something like ClassName<.ctor> ?
How about:
Using a string compare is a bit heavy-handed, but it works :)