(i) Diagnostic overview
name Space System.Diagnostics provides classes for tracing, event logging, performance measurement, and code contracts. classes in the System.Diagnostics.Contracts namespace can define preconditions, post conditions, and constants that can be checked not only during run time, but also with static contract analyzers.
(ii) Code agreement
The preconditions list the requirements that the parameters must meet, and the post-conditions define the requirements that the returned data must meet, and the constants define the requirements that the variables must meet in the method.
(iii) Tracking
Reference:http://962410314.blog.51cto.com/7563109/1599988
(iv) Event log
Reference:http://www.cnblogs.com/nokiaguy/archive/2009/02/26/1398708.html
(v) Performance monitoring
Reference:http://www.cnblogs.com/ZHONGYUANZHONGGONG/p/3399711.html
"Reading notes" C # Advanced Programming 20th Chapter Diagnosis