System.Diagnostics Namespaces

The System.Diagnostics namespaces contain types that enable you to interact with system processes, event logs, and performance counters. Child namespaces contain types to interact with code analysis tools, to support contracts, to extend design-time support for application monitoring and instrumentation, to log event data using the Event Tracing for Windows (ETW) tracing subsystem, to read to and write from event logs and collect performance data, and to read and write debug symbol information.

NamespaceDescription
System.DiagnosticsThe System.Diagnostics namespace provides classes that allow you to interact with system processes, event logs, and performance counters.
System.Diagnostics.CodeAnalysisThe System.Diagnostics.CodeAnalysis namespace contains classes for interaction with code analysis tools. These tools are used to analyze code for conformance to coding conventions such as naming or security rules.
System.Diagnostics.ContractsContains static classes for representing program contracts such as preconditions, postconditions, and invariants.
System.Diagnostics.Contracts.InternalProvides classes that the binary rewriter can use to handle a contract failure.
System.Diagnostics.DesignThe System.Diagnostics.Design namespace contains classes that can be used to extend design-time support for application monitoring and instrumentation.
System.Diagnostics.EventingContains the classes used to instrument your application. The instrumentation, when enabled, logs the event data to the Event Tracing for Windows (ETW) tracing subsystem. For a complete description of ETW, see Event Tracing for Windows.
System.Diagnostics.Eventing.ReaderUsing the System.Diagnostics.Eventing.Reader namespace, you can develop applications that read and manage event logs. An event in an event log contains information, a warning, or an error that has been published by a specific application, service, or operating system component. These events are read by applications that monitor a computer's health and applications that take action when specific events occur. For more information, see Technology Summary for Reading and Managing Event Logs and Event Log Scenarios.
System.Diagnostics.PerformanceDataUse the classes in this namespace to provide counter data. The counters are used to expose performance metrics to consumers such as the Performance Monitor. The namespace does not contain classes for consuming the counter data. For a complete description of the performance counters architecture, see Performance Counters.
System.Diagnostics.SymbolStoreThe System.Diagnostics.SymbolStore namespace provides classes that allow you to read and write debug symbol information, such as source line to Microsoft intermediate language (MSIL) maps. Compilers targeting the.NET Framework can store the debug symbol information into programmer's database (PDB) files. Debuggers and code profiler tools can read the debug symbol information at run time.
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft