Click here to Skip to main content
13,141,576 members (56,328 online)
Rate this:
Please Sign up or sign in to vote.
See more:
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?)

Posted 5-Apr-13 15:18pm
Are you sure it was phrased exactly as you described? As such, it sounds gibberish. Perhaps you did not understand those people, or they didn't know what they are talking about. Anyway, I explain all which is involved in my answer, please see.

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

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:[^].

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:[^].

This is how the entry point is selected:[^].

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


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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web01 | 2.8.170915.1 | Last Updated 5 Apr 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100