The other solutions do not take into account that the controls can be nested (I personally always put a number of Panels (splitters, etc.) and add other controls as Panel's children).
So, the solution needs to be recursive:
void ClearTextBoxes(Control parent) {
foreach (Control child in parent.Controls) {
TextBox textBox = child as TextBox;
if (textBox == null)
ClearTextBoxes(child);
else
textBox.Text = string.Empty;
}
}
ClearTextBoxes(myForm);
—SA