C # What is MainForm. cs, MainForm. Designer. cs, and MainForm. resx in the Form file,

Source: Internet
Author: User

C # What is MainForm. cs, MainForm. Designer. cs, and MainForm. resx in the Form file,

Form. cs and Form. Designer. cs are actually a class. To facilitate management, Visual Studio uses the partial keyword to open the Form class,

Form. Designer. cs stores the layout of the Form, which controls are defined for your Form, and the names and attributes of those controls are stored in Form. Designer. cs,
Form. cs is used to store the processing method. For example, if your button click event is bound to the Button_Click method, it will appear in Form. cs,
Form. resx is used to store your Form resources. For example, if you customize the icon of your Form, this icon will appear in Form. resx.

In fact, in earlier versions of Visual Studio, there was no Form. Designer. cs, and the Form design class and logic class were all in one file.

The benefits are obvious: easy to manage. It makes programming more intuitive.

Related Article

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.