How do I find the method name of the calling method from a method at runtime?
For example:
Class A
{
M1()
{
B.M2();
}
}
class B
{
public static M2()
{
// I need some code here to find out the name of the method that
// called this method, preferably the name of the declared type
// of the calling method also.
}
}