using System.Diagnostics;
PerformanceCounter objCounter = new PerformanceCounter("MSMQ Queue", "Messages in Queue", @"mymachine\private$\MyQueue");
int count = (int)(objCounter.NextValue());
时间: 2024-10-12 17:03:02
using System.Diagnostics;
PerformanceCounter objCounter = new PerformanceCounter("MSMQ Queue", "Messages in Queue", @"mymachine\private$\MyQueue");
int count = (int)(objCounter.NextValue());