In this chapter, we briefly looked at the System.Diagnostics namespace, highlighting its main features. Those include ways to instrument code to ease debugging as well as the monitoring of production software. You also learned about the introduction of the code contracts API in .NET 4.0, which allows you to go beyond the expressiveness of simple debug asserts by expressing more invariants about your code.

Finally, we also examined a common operation for programs: the ability to interact with other processes on the system. This functionality, too, finds its home in the same System.Diagnostics namespace.

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.