I use the following two lines of code to create a performance counter with an
instance name.
PerformanceCounterCategory.Create(m_CategoryName, "",
PerformanceCounterCategoryType.MultiInstance, m_CounterName, "");
PerformanceCounter counter = new PerformanceCounter(m_CategoryName,
m_CounterName, "test", false);
But I get this exception:
"Category 'cat' is marked as single-instance. Performance counters in this
category can only be created without instance names."
Any idea?
Thanks.
Kai