.NET Compilation

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • newkhan
    New Member
    • Oct 2007
    • 35

    .NET Compilation

    Hi All,
    I have made a project in C# named as "Access" now at final stage all classes are complete and work is done. At last time when I select Build Command then the Error Comes as under

    Program 'D:\newc#\Acces s\obj\Debug\Acc ess.exe' does not have an entry point defined

    And I am unable to tackle it and to understand it. Kindly guide me what's the matter here is?

    Thanks.
  • Shashi Sadasivan
    Recognized Expert Top Contributor
    • Aug 2007
    • 1435

    #2
    You might have deleted the file Program.cs which contained the Main class

    Create another project and either imitate the behaviour of that file, or use the same

    Comment

    • bhar
      Banned
      New Member
      • Apr 2006
      • 37

      #3
      Hi,

      The first function to be called in any C# program is Main. The CLR calls Main() when your program starts. Main() is the entry point for your program, and every C# program must have a Main() method.

      It is technically possible to have multiple methods in C#; in that case you use the /main command-line switch to tell C# which class contains the Main() method that should serve as the entry point to trhe program.

      Note: Main() is the entry point for every C# program, similar tin some ways to the Java applet run() method or the java program's main method.
      Last edited by pbmods; Oct 22 '07, 01:29 AM. Reason: Removed commercial link.

      Comment

      Working...