The program defines multiple entry points. Compiling with/main (specifying the type that contains the entry point)

Source: Internet
Author: User

Original: Please compile with/main to specify the type of entry point included

When using the VS tool to learn C # when you need to keep writing small programs, I feel that each time the new project is too troublesome, so try to write the program under a project, the results of the compilation error, because I use the main () method for each applet, and the information of the VS is not understand the reason, but do not know how to do , and then look at MSDN to get a solution, to share with people who have the same doubts as I do:

Workaround:

vs Interface Click: Project-->XX Properties--The application on this page has a Startup object property set to the class name you want to start.

In addition:/main is compiled when the cmd command bar uses CSC to compile multiple classes with the main () function to specify the type that contains the entry point

EG:CSC T2.cs T3.cs/main:test2

The program defines multiple entry points. Compiling with/main (specifying the type that contains the entry point)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.