[VB.NET][ASP.NET] Get class name/handler name called

Fruity

Member
Joined
Sep 28, 2004
Messages
6
Programming Experience
1-3
[font=verdana, arial, helvetica]Hello,

I developed classes in VB.NET
In certain cases, I must register an event in a table of logs, that is to say to specify that such method of such class was well carried out, or on the contrary that it failed

For example:

Code:
Public Class MaClass

Public sub doEnregistreInfo()

'Instruction ....
If add one log Info
'if bResult then
addEventInfo ("MaClass.doEnregistreInfo : a réussi")
else
'Else add one log Error
addEventError ("MaClass.doEnregistreInfo : a échoué")
end if

end sub

end class

To avoid writing in the chains the name of the class, and the name of the method, there exists a means of recovering the name of the class called and the name of the méthode/fonction called,

- is by using the reflection
me.getType().???

- is with information of the assembly
me.getType().assembly.???

- is by using another method.

I already started to look at the methods of the reflection, and the assembly, but I did not find anything for the moment which can indicate this information to me.

An idea, a suggestion, thank you in advance
[/font]
 
Back
Top