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
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
MarioPosted Jul 12, 2008, 11:18 AM
Andrzej WawrzyniakPosted Jul 12, 2008, 6:49 AM
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); }Andrzej WawrzyniakPosted Jul 12, 2008, 6:44 AM