4
Reply

I got error when i used const keyword in Main Method

sameer shaikh

sameer shaikh

8 years ago
234
 Class Sample
{
        public const int i = 3; //
 
      public static void Main(string[] args)
      {
      public const string name = "sameer";
      public const int id = 10;
      }
}
 
if remove public in Main method then every thing is well. please let me know how is it? 

Answers (4)