Search code examples
.netloggingsystem.diagnosticstracesource

Difference between using Trace and TraceSource


Anyone knows the difference between System.Diagnostic.Trace and System.Diagnostic.TraceSource classes?

I've been using Trace for most of my projects and I just happen to found out about TraceSource the other day. They seems to offer similar API, is one better than the other?


Solution

  • TraceSource is the newer version (since .NET 2) and Trace is the older version, more info is available here:

    Clarification on TraceSource/Trace