Home All Groups Group Topic Archive Search About

get current module name

Author
26 May 2006 8:33 PM
Brahm
hey,

    another question guys..

    is there any way to get module name ?

    E.g: bas_serial_comm.vb

Daniel

Author
26 May 2006 11:29 PM
Mythran
"Brahm" <daniel.br***@contronic.com.br> wrote in message
news:u236aOQgGHA.4708@TK2MSFTNGP04.phx.gbl...
> hey,
>
>    another question guys..
>
>    is there any way to get module name ?
>
>    E.g: bas_serial_comm.vb
>
> Daniel
>
>

System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name

HTH,
Mythran
Author
29 May 2006 11:56 AM
Brahm
Thanks!

Show quoteHide quote
"Mythran" <kip_potter@hotmail.comREMOVETRAIL> escreveu na mensagem
news:ezK0CxRgGHA.4940@TK2MSFTNGP05.phx.gbl...

"Brahm" <daniel.br***@contronic.com.br> wrote in message
news:u236aOQgGHA.4708@TK2MSFTNGP04.phx.gbl...
> hey,
>
>    another question guys..
>
>    is there any way to get module name ?
>
>    E.g: bas_serial_comm.vb
>
> Daniel
>
>

System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name

HTH,
Mythran
Author
30 May 2006 3:28 PM
Mythran
Show quote Hide quote
"Brahm" <daniel.br***@contronic.com.br> wrote in message
news:%23ufb3bxgGHA.4404@TK2MSFTNGP05.phx.gbl...
> Thanks!
>
> "Mythran" <kip_potter@hotmail.comREMOVETRAIL> escreveu na mensagem
> news:ezK0CxRgGHA.4940@TK2MSFTNGP05.phx.gbl...
>
> "Brahm" <daniel.br***@contronic.com.br> wrote in message
> news:u236aOQgGHA.4708@TK2MSFTNGP04.phx.gbl...
>> hey,
>>
>>    another question guys..
>>
>>    is there any way to get module name ?
>>
>>    E.g: bas_serial_comm.vb
>>
>> Daniel
>>
>>
>
> System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name
>
> HTH,
> Mythran
>
>

Just so ya know, bas_serial_comm.vb is the name of the file, not module.
The module may have a different name, and modules definately have no
extensions (.vb).

Mythran