title: c# performanceCounter setting raw value of counter
body: <p>I am trying to c# PerformanceCounter Library part of System.Diagnostic. While setting the raw value of the counter using</p>
  
  <p>public long RawValue { set; get; }</p>
  
  <p>I was passing the Rawalue to 0. However I noticed that Maximum value of the counter was reset to a very large number. Previous value of the counter was 2</p>
  
  <p>Can someone help me out and point out any mistake I might be making, here is my code</p>
  
  <pre><code>using (PerformanceCounter ctr = new     
  PerformanceCounter(Settings.Instance.SetSourceAppliacationName, counter.ToString(), false))
  {
      if (incrementCounter)
      {
          ctr.IncrementBy(value);
      }
      else
      {
          ctr.RawValue = value;
      }
  }
  </code></pre>