Which among these access specifiers should be used for main() method?

Trường Phan

New member
Which among these access specifiers should be used for main() method?
A. private
B. public
C. protected
D. none of the mentioned
 
Answer: b
Explanation: main() method must be specified public as it called by Csharp run time system outside of the program, by default main is private in nature if no access specifier is used.
 

Tìm kiếm

Back
Top