title: Is there an equivalent to static of C in C#?
body: <p>In C I can do </p>
  
  <pre><code>void foo() {
    static int c = 0;
    printf("%d,", c);
    c ++;
  }
  
  foo(); 
  foo(); 
  foo();
  foo();
  </code></pre>
  
  <p>it should print <code>0,1,2,3</code></p>
  
  <p>Is there an equivalent  in C#?</p>