申请何处可以输入? [英] Where can an application be entered?

查看:56
本文介绍了申请何处可以输入?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我把这作为面试问题。



我的答案是静态int / void主要方法,然而,他们说这是错误的,应用程序可以进入任何地方。他们是对的吗?这怎么可能? (即:某种类型的调试工具?)



谢谢。

I had this as a job interview question.

My answer was the static int/void Main method, however, they said that was wrong and an application can be entered anywhere. Are they right? How is this possible? (ie: some type of debugging tool?)

Thanks.

推荐答案

没有这样的东西因为可以输入申请。如果你的意思是应用程序的入口点,它可能真的很模糊。对于这种情况,有一个项目选项有助于选择一个类,声明用于定义应用程序入口点的类;入口点函数本身是根据这个定义的:

http://en.wikipedia .org / wiki / Main_function#C.23 [ ^ ]。



要了解如何选择入口点来解决Visual Studio中的歧义,请查看项目属性。对于C#编译器(csc.exe),选项请参阅:

http:/ /msdn.microsoft.com/en-us/library/6ds95cz0.aspx [ ^ ]。



这是入口点的选择方式: http://msdn.microsoft.com/en-us/library/x3eht538.aspx [ ^ ]。



如您所见,应该使用声明类的名称。



-SA
There is no such thing as "application can be entered". If you mean the entry point of the application, it can really be ambiguous. For such cases, there is a project option helping to select a class declaring the class used to define the application entry point; the entry point function itself is defined according to this:
http://en.wikipedia.org/wiki/Main_function#C.23[^].

To see how an entry point can be selected to resolve the ambiguity in Visual Studio, please take a look a the project properties. For C# compiler (csc.exe), options please see:
http://msdn.microsoft.com/en-us/library/6ds95cz0.aspx[^].

This is how the entry point is selected: http://msdn.microsoft.com/en-us/library/x3eht538.aspx[^].

As you can see, the name of the declaring class should be used.

—SA


这篇关于申请何处可以输入?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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