[Solved] How to read from text file to array? [closed]
your code seems tidy! Replace your code from for (int i = 0; i < line.Length; i++) and place this int i=0; while (i < line.Length) { if (line[i] != ‘ ‘) { numbers[numCount] = “”; while (line[i] != ‘ ‘) { numbers[numCount] += line[i]; i++; if (i >= line.Length) break; } numCount++; } i++; … Read more