A problem encountered in the statistical system was finally solved, but it was still difficult for me to debug it for so long.
The execution sequence of events that inherit forms and controls is generally a queue.
First come, first registered first.
C #, Java inheritance execution starts from its parent.
Problem/summary:
1. In winform, when form. CS (default) is enabled, it loads its parent constructor and form_load.
2. Type: cboyear. selectedindexchanged + = new system. eventhandler (cboyear_seletedindexchanged) is only the event registration, passing the function address, which was previously thought to be executed once... Poor!
3. When you use the form tag to pass values, assign values to the overloaded constructor. After form_load combox1.datasource = xxx, the tag value will be lost. I don't understand.
4. Constructor ==> form_load. Run from top to bottom.