System.Diagnostics.PerformanceCounter.IncrementBy C# (CSharp) Method

IncrementBy() public method

public IncrementBy ( long value ) : long
value long
return long
        public long IncrementBy(long value) { throw null; }
        public System.Diagnostics.CounterSample NextSample() { throw null; }

Usage Example

 /// <summary>
 /// Invoked before passing to the method
 /// </summary>
 /// <param name="c"></param>
 protected virtual void BeforeCallInvoke(PerformanceCounter c)
 {
     if (c != null)
     {
         lock (c)
         {
             string name = c.InstanceName;
             c.IncrementBy(_increaseDecrease);
             //also update overall insance!
             c.InstanceName = OverallInstance;
             c.IncrementBy(_increaseDecrease);
             c.InstanceName = name;
         }
     }
 }
All Usage Examples Of System.Diagnostics.PerformanceCounter::IncrementBy