Yes. The Main() method may easily be played around with by developers by passing different parameters and setting different return types. See the code below, that demonstrates different ways the Main() method may be implemented: (1) public static void Main(string[] args) { //NO return type, the argument is an array of strings }
(2) public static int Main(string[] args) { //Return type is int, argument is an array of strings }
(3) public static int Main() { //Return type is int, NO arguments }
(4) public static void Main() { //Return type is void, NO arguments }
If you have the better answer, then send it to us. We will display your answer after the approval.
Rules to Post Answers in CoolInterview.com:-
There should not be any Spelling Mistakes.
There should not be any Gramatical Errors.
Answers must not contain any bad words.
Answers should not be the repeat of same answer, already approved.