C#, absolute beginner getting CS1513 C# } expected error

前端 未结 5 875
深忆病人
深忆病人 2021-01-29 08:52

This is my very first day of programming without having any programming background. I was trying the below code. Please click the below link for the screenshot.

CS1513

5条回答
  •  灰色年华
    2021-01-29 09:26

    if we use access specifiers inside the static main function for creating the variables like string, it will give this error.

    for ex:-

    namespace ExamplePrgs
    {
        public class MyTestClass
        {
            public static void Main(string[] args)
            {
                public string check_error;//don't use public here. Delete it, it will not show error
            }
        }
    }
    

提交回复
热议问题