1

I have try the following code on a machine with english language setted :

 PerformanceCounterCategory[] categories = PerformanceCounterCategory
                                          .GetCategories()
                                          .Where ( x => x.CategoryName == "Process" )
                                          .ToArray()

It found an entry, but if i try the same code on a machine with italian language i am not able to find any category until i traslate it in italian (eg : process became processo).

PerformanceCounterCategory[] categories = PerformanceCounterCategory
                                          .GetCategories()
                                          .Where(x = > x.CategoryName == "Processo")
                                          .ToArray()

My problem is that i would avoid to manually transalte category name for each language i may find on customer system.

Ehsan Sajjad
  • 61,834
  • 16
  • 105
  • 160
Skary
  • 1,322
  • 1
  • 13
  • 40

0 Answers0