private void ClearControl(Control sender)
{
foreach (Control item in sender.Controls)
{
if (item is CoreTextBox || item is CoreComboBox)
{
item.text = string.Empty;
continue;
}
if (item.Controls.Count > 0)
ClearControl(item);
}
}
小结:方法内可自调方法,即反复递归调用自身