Cool Method You Never Knew Existed

Ever needed to get the method description for the currently executing method? You can do this pretty easily by calling: "ConstructorInfo.GetCurrentMethod()."

Update: Don points out that you can also use MethodBase.GetCurrentMethod(). I am really impressed with the whole Reflection and Reflection.Emit namespaces. The more I use them the cooler they get.

Update: Drew notes that ConstructorInfo inherits this method from MethodBase :-).

Update: Atif mentioned this his MSDN Magazine August 2002 article. I can't believe I missed it.

2 Comments

Comments have been disabled for this content.