[Solved] Read, write, from and to a file using C#
The problem is that you are declaring your string array inside the loop and never populating it with anything. Move that string array outside the loop instead. Also, I don’t think you want to write the file every time through the loop, so move file write outside the loop too. static void Main(string[] args) { … Read more