Can someone please tell me how to get a function or method name inside that function/method's body? For example ... void foo(int x) { string name = getFunctionName(); assert(name == "foo"); } Compile time or runtime either is OK. Thanks