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

A Simple Introduction to Cisco CML2

0 3622 0

Mark Jacob, Cisco Instructor, presents an introduction to Cisco Modeling Labs 2.0 or CML2.0, an upgrade to Cisco’s VIRL Personal Edition. Mark demonstrates Terminal Emulator access to console, as well as console access from within the CML2.0 product. Hello, I’m Mark Jacob, a Cisco Instructor and Network Instructor at Interface Technical Training. I’ve been using … Continue reading A Simple Introduction to Cisco CML2

How to Build in a PSMethod to your PowerShell Code

0 65 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

How to use the PowerShell ConvertFrom- CSV Cmdlet to Save Coding Time with PS Script

0 316 4

In this video, PowerShell instructor Jason Yoder shows how to use the ConvertFrom-CSV PowerShell Cmdlet to easily convert standard CSV files into PowerShell objects and speed up coding time. For instructor-led PowerShell training classes, see our course schedule: Microsoft Windows PowerShell Training PowerShell ConvertFrom-CSV script used in this video. Download ConvertFrom-CSV PowerShell Script <# ╔══════════════════════════════════════════════════════════════════════════════╗ … Continue reading How to use the PowerShell ConvertFrom- CSV Cmdlet to Save Coding Time with PS Script

Write a Comment

Share your thoughts...

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