Why create a TraceSource as static?

144 views Asked by At

For all the examples I have seen of people creating a TraceSource for a class, it is always defined as static

private static TraceSource traceSource = new TraceSource("TraceSourceApp");

Why do this over

private readonly TraceSource _traceSource = new TraceSource("TraceSourceApp");

What's the advantages/disadvantages?

1

There are 1 answers

0
MatthewMartin On BEST ANSWER

They should always be static.