hello
im making a simple registration form and i want to clear all the text in the textbox after the information is added
foreach (TextBox t in Form1){
t.text=null;
}
Error 1 'WindowsApplication1.Form1' is a 'type' but is used like a 'variable'
thanks for the help
should be:
t.Text = "";
or
t.Clear();
foreach(Control curControl in this.Controls)
{
if (curControl.GetType() == typeof(TextBox))
((TextBox)curControl).Text = "";
thanks bro it worked