CSharp examples for System.Windows.Forms:TextBox
Clear Form Text Box
using System.Windows.Forms; using System.Globalization; using System;/*from w w w. j av a2 s . c om*/ public class Main{ public static void ClearTextBox(Control ctrl) { foreach (Control c in ctrl.Controls) { var textBox = c as TextBox; if (textBox != null) { textBox.Clear(); } if (c.HasChildren) { ClearTextBox(c); } } } }