Can I get the current method's MethodInfo somehow?
+7
A:
Found it myself after some screwing around with the reflection namespace...
System.Reflection.MethodBase.GetCurrentMethod()
borisCallens
2009-03-11 12:44:11
Hehe. You just beat me to it! Note that this returns a MethodBase object, not a MethodInfo. But that may be just what you are after.
Rune Grimstad
2009-03-11 12:47:14
now accept the the answer, and get a new badge:-)
Greg Dean
2009-03-11 12:48:32
Well, actually I can't accept my answer untill after 24 hours. Although I did get the batch anyway :P But I'm not really a badge hunter. SO has much more to offer then a coding RPG
borisCallens
2009-03-11 12:55:00
+1
A:
Try the System.Reflection.MethodBase.GetCurrentMethod static method.
Rune Grimstad
2009-03-11 12:45:06