Click here to Skip to main content
15,742,973 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
What is the difference between

Void Main()


Void main()


1 solution

No difference, only they are different functions (and "void" must be lo-case; you code won't format) and "main" is not the entry point of executable assembly by default.

It's important to know, that the entry point does not have to be "Main". It can be any static method with on of the required signatures ([^]). If you are using Visual Studio, you can go to project's property and change the class where the entry point is supposed to be.

Share this answer
sairam.bhat 15-Mar-11 1:02am    
k thanks sir
Sergey Alexandrovich Kryukov 15-Mar-11 1:11am    
You're welcome.
Thanks for accepting my Answer, good luck,
Albin Abel 15-Mar-11 1:53am    
Expected your answer here. But wondering why people downvote for no reason. I don't think my compensation won't increase that vote level
Sergey Alexandrovich Kryukov 15-Mar-11 1:59am    
It's OK, thank you.
Espen Harlinn 15-Mar-11 12:16pm    
That 1 was placed by a CP heavyweight - probably having a bad hair day :) - your reply is both nice and accurate ...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900