Click here to Skip to main content
Rate this: bad
Please Sign up or sign in to vote.
See more: .NET
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 16:18pm
Sergey Alexandrovich Kryukov at 5-Apr-13 23:02pm
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
0 Maciej Los 475
1 OriginalGriff 410
2 Sascha Lefévre 289
3 CPallini 285
4 Sergey Alexandrovich Kryukov 274
0 Sergey Alexandrovich Kryukov 9,897
1 OriginalGriff 9,395
2 Peter Leow 5,162
3 Kornfeld Eliyahu Peter 3,373
4 Maciej Los 3,036

Advertise | Privacy | Mobile
Web03 | 2.8.150327.1 | Last Updated 5 Apr 2013
Copyright © CodeProject, 1999-2015
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