how to write every element of an array in a line of a textbox C# [closed]

Your for loop is using a value taken from your values array as the count limit, but you are indexing myArray. As you stated in your comment, you are going outside your array bounds.

You should have:

for (int t = 0; t < myArray.Length; t++)

Leave a Comment