Hi...
Im trying to make a software that would save 2d arrays to a txt file and load them later....
Arrays have predefined size 160*365
Does anyone have an idea how I can do this?
Loading and saving 2d arrays into a txt file?
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Andrzej Wawrzyniak8 pointsPosted Jul 12, 2008, 2:44 AM EDT
Andrzej Wawrzyniak8 pointsPosted Jul 12, 2008, 2:49 AM EDT
ArrayList Rows = new ArrayList(); StreamReader sr = new StreamReader("file.txt"); while(!sr.eof) { String str = sr.ReadLine(); ArrayList row = new ArrayList(); foreach(String s in str.split(new char[',']) row.Add(s); Rows.Add(row); }1 short reply
Mario2 pointsPosted Jul 12, 2008, 7:18 AM EDT