HighTechTalks DotNet Forums  

Retrieving the currently executing method name at runtime?

Dotnet Framework (SDK) microsoft.public.dotnet.framework.sdk


Discuss Retrieving the currently executing method name at runtime? in the Dotnet Framework (SDK) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
jnick
 
Posts: n/a

Default Retrieving the currently executing method name at runtime? - 02-24-2006 , 03:44 PM






Is there any way(as there is in VC++) to retrieve the name of the method that
execution is currently in? I want to write a generic user notification that
will display, among other things, the name of the method in which an error or
exception occured.

Reply With Quote
  #2  
Old   
Phil Wilson
 
Posts: n/a

Default Re: Retrieving the currently executing method name at runtime? - 02-24-2006 , 06:40 PM






MethodBase.GetCurrentMethod().ToString().
--
Phil Wilson [MVP Windows Installer]
----
"jnick" <jnick (AT) discussions (DOT) microsoft.com> wrote

Quote:
Is there any way(as there is in VC++) to retrieve the name of the method
that
execution is currently in? I want to write a generic user notification
that
will display, among other things, the name of the method in which an error
or
exception occured.



Reply With Quote
  #3  
Old   
jnick
 
Posts: n/a

Default Re: Retrieving the currently executing method name at runtime? - 02-27-2006 , 09:07 AM



Thanks, Phil. I haven't used Reflection much and didn't know to look there.

"Phil Wilson" wrote:

Quote:
MethodBase.GetCurrentMethod().ToString().
--
Phil Wilson [MVP Windows Installer]
----
"jnick" <jnick (AT) discussions (DOT) microsoft.com> wrote in message
news:80E72897-AADA-4C8A-A43D-EED0FA441171 (AT) microsoft (DOT) com...
Is there any way(as there is in VC++) to retrieve the name of the method
that
execution is currently in? I want to write a generic user notification
that
will display, among other things, the name of the method in which an error
or
exception occured.




Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.