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

Void Main()
{
}


and

Void main()
{

}
Posted

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 (http://www.csharphelp.com/2006/08/entry-point-in-c-program/[^]). 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.

—SA
 
Share this answer
 
v2
Comments
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,
--SA
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.
--SA
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