使用跟踪和TraceSource的区别区别、TraceSource

2023-09-03 15:39:42 作者:可爱的你

任何人都知道System.Diagnostic.Trace和System.Diagnostic.TraceSource?

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

我一直在使用跟踪我的大多数项目,我只是碰巧发现了约TraceSource的一天。他们似乎提供类似的API,比另一种更好呢?

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?

推荐答案

我觉得TraceSource是较新的版本(因为.NET 2)和Trace是旧版本,更多信息,请访问:

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

Clarification在TraceSource /跟踪