Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Retrieving Class Name?

Status
Not open for further replies.

KreativeKai

Programmer
Nov 12, 2004
33
US
I've found code to display the name of the program that is currently running:
MsgBox(System.Reflection.Assembly.GetExecutingAssembly.GetName.Name)

and I've found code to display the sub routine I'm currently in:
MsgBox(System.Reflection.MethodInfo.GetCurrentMethod.Name)

Does anyone have code to display the class that the sub resides in?

Thanks for any input you can give!
 
Thanks for you help!!

I also received a reply on another message board to try the following which also works well:
System.Reflection.MethodInfo.GetCurrentMethod.DeclaringType.Name
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top