string[] x = new string[] { "NAME", "SEX", "AGE", "SCHOOL"}; public void ClearControls(TextBox[] A) { foreach (TextBox a in A) { a.Text = x; } The method is intended to assign elements of x to some textboxes. The statement: a.Text=x; is the problem. I would appreciate it modified for me. Thank you.
a.Text =x[counter];
for (Int32 i = 0; i < A.Length; i++) { A[i].Text = x[i]; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)