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 51 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

JavaScript for C# Developers – September 24, 2014

0 487 3

Is JavaScript worth taking the time to learn if I’m a server-side .NET developer? How much of C# carries over to JavaScript? In this recorded video from Dan Wahlin’s webinar on September 24,2014, Dan answers these questions and more while also discussing similarities between the languages, key differences, and the future of JavaScript (ES6). If … Continue reading JavaScript for C# Developers – September 24, 2014

Detailed Forensic Investigation of Malware Infections – April 21, 2015

4 630 5

How does an investigator hunt down and identify unknown malware? In this recording of our IT Security training webinar on April 21, 2015, Security expert Mike Danseglio (CISSP / CEH) performed several malware investigations on infected computers and identify symptoms, find root cause, and follow the leads to determine what’s happening. He demonstrated his preferred … Continue reading Detailed Forensic Investigation of Malware Infections – April 21, 2015

Write a Comment

Share your thoughts...

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