CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums
Results 1 to 3 of 3

Thread: Multiple entry points, main

  1. #1
    Join Date
    Oct 2009

    Multiple entry points, main

    Hi all,

    I am developing a console application in C#. I have two different class files but if I put main in both, I am getting error about multiple entry point to the project.

    Now, if I remove the main in one file, the functions under it, give the following error:
    Methods must have a return type

    Many thanks,

  2. #2
    Join Date
    Jun 2008

    Re: Multiple entry points, main

    Why you are creating multiple entry points in the first place? You should keep your class files separate, there is no reason to plop them into your Program.cs file.

  3. #3
    Join Date
    Mar 2004
    Prague, Czech Republic, EU

    Re: Multiple entry points, main

    Which Main() you want to use can be set in project's properties on Application tab in item Startup object.
    • Make it run.
    • Make it right.
    • Make it fast.

    Don't hesitate to rate my post.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

On-Demand Webinars (sponsored)