C#'s const is the exact same thing as Java's final, except it's absolutely always static. In my opinion, it's not really necessary for a const variable to be non-static, but if you need to access a const variable non-static-ly, you can do:
class MyClass { private const int myLowercase_Private_Const_Int = 0; public const int MyUppercase_Public_Const_Int = 0; /* You can have the `private const int` lowercase and the `public int` Uppercase: */ public int MyLowercase_Private_Const_Int { get { return MyClass.myLowercase_Private_Const_Int; } } /* Or you can have the `public const int` uppercase and the `public int` slighly altered (i.e. an underscore preceding the name): */ public int _MyUppercase_Public_Const_Int { get { return MyClass.MyUppercase_Public_Const_Int; } } /* Or you can have the `public const int` uppercase and get the `public int` with a 'Get' method: */ public int Get_MyUppercase_Public_Const_Int() { return MyClass.MyUppercase_Public_Const_Int; } }
Well, now I realize this question was asked 4 years ago, but since I put around 2 hours of work, consisting of trying all sorts of different ways of answering and code formatting, into this answer, I'm still posting it. :)
But, for the record, I still feel kinda silly.