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.