Determining the current procedure name and the namespace for the class it is in

  • Thread starter Thread starter roddles
  • Start date Start date
R

roddles

Hi

I need to at runtime determine the name of the function I am currently in, and the namespace of the class the function is executing from. I need this information for some logging routines i am writing and I do not want to have to hard code everything

Can someone tell me which classes i need to use in order to get this information. Some sample code snippets would be very helpful if available

Cheer

Rod.
 
* roddles said:
I need to at runtime determine the name of the function I am currently
in, and the namespace of the class the function is executing from. I
need this information for some logging routines i am writing and I do
not want to have to hard code everything.

For the method:

\\\
MsgBox(System.Reflection.MethodBase.GetCurrentMethod().Name)
///
 
Back
Top