The following is a correct call to the Main() function

Skill/Topic: Beginner
A) static void Main()
B) static Main(void)
C) Main()

Showing Answers 1 - 11 of 11 Answers

cknoll

  • Jan 20th, 2006
 

To call a method, you just give the name and parameters. The correct way to call public static void Main() is to use 'Main();'. I'm not sure why the answer isn't C.The proper way to _declare_ the Main(0 function isstatic void Main()But if we are talking about _the_ Main() method then the proper way is:public static void Main(string[] args) {}-Chris

s

  • Feb 15th, 2006
 

the program will not compile if u jus say Main() or void Main(). we should mention the keyword 'static' before Main method.

  Was this answer useful?  Yes

bernie

  • Mar 7th, 2006
 

i agree with Chris. I have NEVER called a method using the keyword static. I only use static when declaring a method. Correct this question or throw it out!

shubhoh

  • Apr 22nd, 2006
 

we call a function just by its name , be it main or anything else.

static void Main() is its signature not a call.

Main() is entry point of application thread and is called itself.

 

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions