title: How to declare a local constant in C#?
body: <p>How to declare a local constant in C# ? </p>
  
  <p>Like in Java, you can do the following :</p>
  
  <pre><code>public void f(){
    final int n = getNum(); // n declared constant
  }
  </code></pre>
  
  <p>How to do the same in C# ? I tried with <code>readonly</code> and <code>const</code> but none seems to work.</p>
  
  <p>Any help would be greatly appreciated.</p>
  
  <p>Thanks.</p>