Is there anyway to get the current method name from inside an async function?
I\'ve tried:
System.Reflection.MethodInfo.GetCurrentMethod(); >
System.Reflection.MethodInfo.GetCurrentMethod();
This method works from async method call as well as from normal method. (C#5)
/// /// Returns Current method name /// /// callers method name public string GetCurrentMethod([CallerMemberName] string callerName = "") { return callerName; }