Click here to Skip to main content
15,878,871 members
Articles / Programming Languages / C#

How to log the current call stack in .NET

Rate me:
Please Sign up or sign in to vote.
4.69/5 (11 votes)
10 Jul 2011CPOL1 min read 99.9K   1.6K   45  
This article explains how to log the current call stack by using the StackFrame and StackTrace classes of the .NET Framework.

Alternatives

Members may post updates or alternatives to this current article in order to show different approaches or add new features.

No alternatives have been posted.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Technical Lead Esaote
Italy Italy

Since 1998, I'm a software project leader at Esaote, one of the world's major manufacturers of non-invasive diagnostic equipment and system, as well as the leading European manufacturer of ultrasound imaging equipment.


My professional skills include:



  • Programming Languages: C#, C/C++, ASP.NET, XML, XSLT, Prolog.
  • Libraries: .NET Framework, STL, MFC.
  • Paradigms and Standards: Object-Oriented Programming, Design Patterns, Code Generation, Extreme Programming, Design by Contract, Dicom.
  • Tools: Visual Studio .NET, SQL Server.

You can contact me at my Web site (www.mazzeranghi.com).


Comments and Discussions