Quote:
"Index was outside the bonds of the array" i am getting this error
the problem is that you have more buttons than lines in file.
button[i].Text = string.Format("{0}", lines[i]);
I wonder why you use format to make the line the same ?
Why not use this ?
button[i].Text = lines[i];