How to get method name win 8 app
问题 How to get the current method name in win 8(WinRT) app ... earlier in wp7 we could use System.Reflection.MethodBase.GetCurrentMethod().Name but its not there anymore thanks 回答1: Yes, .NETCore lacks a lot of such things... and don't even get me started on GetTypeInfo() ! But perhaps a pragmatic workaround is to get the compiler to do it for you? string CallerName([CallerMemberName]string caller = "") { return caller; } ... string name = CallerName(); 回答2: This option can be helpfull if you