which method will be called when executing a .exe file

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • natraj A V
    New Member
    • Aug 2010
    • 1

    #1

    which method will be called when executing a .exe file

    Which method will be called when executing a .exe file?
    Last edited by Frinavale; Aug 5 '10, 07:40 PM. Reason: In your thread please ask a question. The title is meant as a description for the question, it's not meant to be the question
  • Christian Binder
    Recognized Expert New Member
    • Jan 2008
    • 218

    #2
    static void Main() { }

    Comment

    • Frinavale
      Recognized Expert Expert
      • Oct 2006
      • 9749

      #3
      I guess it depends on the type of application.... for console applications ChBinder's answer is correct.

      -Frinny

      Comment

      • Joseph Martell
        Recognized Expert New Member
        • Jan 2010
        • 198

        #4
        It also depends on the language.

        In C#, console or windows form application, there is call to static void Main() by default. In forms applications static void Main() is usually in a Program.cs file and just calls the main form for the application.

        In VB.Net this is hidden from the programmer. A startup project must be set in the solution properties. The startup project properties specify what type of application it is and what its startup object/form will be.

        Probably more complicated than you were hoping for...

        Comment

        Working...