theraot/Theraot

MethodBase.GetCurrentMethod().Name

Opened this issue · 0 comments

NN--- commented

Possible implementation:

private static string GetCurrentMethod([System.Runtime.CompilerServices.CallerMemberName] string memberName = "") => memberName;

https://docs.microsoft.com/en-us/dotnet/api/system.runtime.compilerservices.callermembernameattribute?view=netframework-4.7.2