title: How to increment a variable that initialize with value '0' for function that gets recalled for many times?
body: <p>This is my C# coding. I want to increment the variable counter every times I recall this function. Is there any way to make the counter variable increment by 1 every times I recall this function?</p>
  
  <pre><code>private void _CalculateValue()
  {
       double b = 0.1;
  
       int counter = 0;
  
       a = a * b;
  
       counter++;    
  }
  </code></pre>