Created
September 17, 2015 06:36
-
-
Save gayancc/93d0c99f408d879ccb01 to your computer and use it in GitHub Desktop.
clear text box value util class
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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