How to declare a local constant in C# ?
Like in Java, you can do the following :
public void f(){
final int n = getNum(); // n declared constant
}
How to do the same in C# ? I tried with readonly
and const
but none seems to work.
Any help would be greatly appreciated.
Thanks.
question from:https://stackoverflow.com/questions/2054761/how-to-declare-a-local-constant-in-c