调试时,出现这样的错:因缺少 CategoryName 而未能初始化:

 

将((System.ComponentModel.ISupportInitialize)(this.performanceCounter1)).EndInit(); 注释掉就没问题了。

相关文章: