Will the code compile?
using System; class Program { public static const int MYCONST = 100; static void Main(string[] args) { const int MYCONST = 100; Console.WriteLine("MYCONST={0}", MYCONST); } }
No.
Constants are implicitly static.
We are not allowed to use the keyword static here.