https://learn.microsoft.com/en-us/dotnet/api/system.diagnostics.performancecountercategory.counterexists?view=netframework-4.8.1&viewFallbackFrom=windowsdesktop-10.0
PerformanceCounterCategory.CounterExists Method (System.Diagnostics) | Microsoft Learn
Determines whether a specified counter is registered to a particular category.
system diagnosticsmethodmicrosoftlearn