In the System.Diagnostics namespace’s functionality discussed thus far, we’ve concerned ourselves with development-time utilities. Examples included the ability to log diagnostic debugger output, develop with asserts, and so on. An equally important aspect to high-quality software is maintainability. It’s the (sad) truth that software tends to fail in production at the most inconvenient times. Asking the IT administration department to attach a debugger to a server that’s producing revenue for your company usually will not be well received. Instead, having diagnostic logging, and more generally other kinds of instrumentation, built in will do a lot to help you figure out what’s going on.

Although a whole realm of manageability ...

Get C# 5.0 Unleashed now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.