Hello, I was wondering if there is some way I can obtain the name of the
subroutine that a line of code is executing in via the code.
Sy for example you wanted to write a message like the following:
Trace.Write("ProcessStart", "Starting in Subroutine 'MySubroutine'"
Is there a way for me to programmatically get the name of the subroutine in
which this line of code is executing such that I do not have to hard code
the information everytime?
Thanks in advance for your assistance!!!!!!Have you tried using the GetMethod method in
System.Diagnostics.StackFrame?
Bruce Johnson
http://www.ObjectSharp.com/Bruce
>--Original Message--
>Hello, I was wondering if there is some way I can obtain
the name of the
>subroutine that a line of code is executing in via the
code.
>Sy for example you wanted to write a message like the
following:
>Trace.Write("ProcessStart", "Starting in
Subroutine 'MySubroutine'"
>Is there a way for me to programmatically get the name
of the subroutine in
>which this line of code is executing such that I do not
have to hard code
>the information everytime?
>Thanks in advance for your assistance!!!!!!
>.
thanks
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment