Skip to content

Instantly share code, notes, and snippets.

@gayancc
Created September 17, 2015 06:36
Show Gist options
  • Save gayancc/93d0c99f408d879ccb01 to your computer and use it in GitHub Desktop.
Save gayancc/93d0c99f408d879ccb01 to your computer and use it in GitHub Desktop.
clear text box value util class
private void ClearTextBoxes()
{
Action<Control.ControlCollection> func = null;
func = (controls) =>
{
foreach (Control control in controls)
if (control is TextBox)
(control as TextBox).Clear();
else
func(control.Controls);
};
func(Controls);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment