How To: Obtain Method Name Programmatically For Tracing – Michael Palermo

Home > Blogs > Developer Visual Studio / ASP.NET > How To: Obtain Method Name Programmatically For Tracing – Michael Palermo

How To: Obtain Method Name Programmatically For Tracing – Michael Palermo

Like This Blog 0 Interface
Added by July 8, 2007

I am not a fan of hard-coding method names in exception or trace messages.  Here is a utility method to allow access to method name at runtime:

If I call the method above from inside another method:

The resulting output is:

"Inside of Application_AuthorizeRequest event handler"

Videos You May Like

How to Build in a PSMethod to your PowerShell Code

0 55 0

In this video, PowerShell instructor Jason Yoder shows how to add Methods (PSMethod) to your code using free software that’s added into the PSObject. For instructor-led PowerShell courses, see our course schedule. Microsoft Windows PowerShell Training Download the Building Methods PowerShell script</a> used in this video. <# ╔══════════════════════════════════════════════════════════════════════════════╗ ║ ║ ║ Building Methods ║ ╟──────────────────────────────────────────────────────────────────────────────╢ … Continue reading How to Build in a PSMethod to your PowerShell Code

Agile Methodology in Project Management

0 171 0

In this video, you will gain an understanding of Agile and Scrum Master Certification terminologies and concepts to help you make better decisions in your Project Management capabilities. Whether you’re a developer looking to obtain an Agile or Scrum Master Certification, or you’re a Project Manager/Product Owner who is attempting to get your product or … Continue reading Agile Methodology in Project Management

Creating Users and Managing Passwords in Microsoft Office 365

0 739 4

In this Office 365 training video, instructor Spike Xavier demonstrates how to create users and manage passwords in Office 365.   For instructor-led Office 365 training classes, see our course schedulle: Spike Xavier SharePoint Instructor – Interface Technical Training Phoenix, AZ 20347: Enabling and Managing Office 365    

Write a Comment

Share your thoughts...

Please fill out the comment form below to post a reply.