Search code examples
.netportable-class-library

Get current method's MethodInfo in portable assembly


I'd like to get current executing method info in portable assembly with Windows Phone and Windows Store apps support. However, MethodInfo.GetCurrentMethod() and MethodBase.GetCurrentMethod() are not available in such a portable assembly. How can I get a MethodInfo for current method?


Solution

  • Maybe you have to use Type.GetMethod (has other overloads too)?