Father class in how to use the special sub-category of type
-
Father class in how to use the special sub-category of type (such as sub-class form on a table on the TableAdapter), the father of the current thinking is kind of like adding traversal of all the things (such as traversing the form of succession All controls), the need to find, it will need to transform the type to use it. But now they can not find this object into the type of need. Thanks a lot. Code is as follows: / / Father traverse sub-class category on the form for the control and use it private void findcontrol (Control.ControlCollection controls) ( foreach (Control ctrl in controls) / / This traversal of a similar type of controls or components ( if (ctrl.GetType (). Name == "customers TableAdapter") / / form on a table, the TableAdapter ( / / Ctrl-type into the TableAdapter customers to use / / Cases, TableAdapter.Update (customers DataTable); / / Ctrl like to, as with customers TableAdapter ) findcontrol (ctrl.Controls); ) )