メモリ パフォーマンス カウンターを使用しようとしています。
System.Diagnostics.PerformanceCounter theMemCounter =
new System.Diagnostics.PerformanceCounter("Memory", "Available MBytes",
System.Diagnostics.Process.GetCurrentProcess().ProcessName, true);
var memStart = theMemCounter.NextValue();
しかし、2 行目で次のエラーが発生します。
Counter is single instance, instance name 'WebDev.WebServer40' is not valid for this counter category.
何が問題ですか?