[RESOLVED] get name of current module
Hello,
What I'd like to is get the name of the current Module running in a VB app. If I am in a Form, I can use "Me.Name", but in a Module that will not work. I tried:
System.Reflection.Assembly.GetExecutingAssembly().GetModules()(0).Name
But that gives the name of the app (like "WindowsApplication1.exe") rather than "Module1", which is what I'd be looking for.
Re: get name of current module
Can you try.
Code:
System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name
Re: get name of current module
That was it. Thanks a lot!
Re: [RESOLVED] get name of current module
How about for the current executing form?