Main()和main()函数有什么区别? [英] What is the difference between Main() and main() functions?

查看:374
本文介绍了Main()和main()函数有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


有什么区别
虚空Main()
{
}




无效的main()
{

}

What is the difference between

Void Main()
{
}


and

Void main()
{

}

推荐答案

没什么区别,只是它们是不同的函数("void"必须为小写;您编写的代码不会格式化),"main"为不是默认情况下的可执行程序集的入口点.

重要的是要知道,入口点不必是主要" .它可以是任何带有所需签名的静态方法( http://www. csharphelp.com/2006/08/entry-point-in-c-program/ [
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


这篇关于Main()和main()函数有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆