+ 20
Arrays to txt file
How to write three separate arrays into 1 txt file? By lines.
3 ответов
+ 3
using (System.IO.StreamWriter file = new System.IO.StreamWriter("filename.txt", true))
{
foreach (string s : array) {
file.WriteLine(s);
}
}
and write 2 additional foreach loops for the other arrays
+ 19
@Edward both acceptable.
First idea was "one line per array" but it seems that reading will be easier with "line per item"
+ 1
do u want one line per array or one line per item in each array