How do I declare a static variable inside the Main method?

后端 未结 6 1944
予麋鹿
予麋鹿 2020-12-03 22:42

Can we declare Static Variables inside Main method? Because I am getting an error message:

Illegal Start of Expression
6条回答
  •  感情败类
    2020-12-03 23:23

    You cannot, why would you want to do that? You can always declare it on the class level where it belongs.

提交回复
热议问题