Today, I opened the C # project and found that all the controls in the form were missing. It was very strange. So I started to find the reason, but it still did not solve the problem. I am helpless. Come on, open it *. desigener. CS file. See form InitializationCode, I created a project, drew several controls on a form, and then added *. desigener. the initialization code in the CS file is compared with the error file, and the following sentence is missing:
Certificate --------------------------------------------------------------------------------------------------------------------------------------
This. Controls. Add (this. textbox10 );
Certificate --------------------------------------------------------------------------------------------------------------------------------------
Textbox10 is the name of my control. If it is yours, you can see the specific control.
After finding the problem, I added all the controls back. Save.
Open the window again-> solve the problem.
If you have not solved the problem, you should learn how to create a project... Then compare *. desigener. CS of the new file with the error file to see if there is no such change. In this way, you can.
I checked on the Internet and found that this should be a bug in C #. The poor C #, the bug C ++, And the bug C # cannot be escaped ......