wood burning stoves 2.0*
The moose likes C / C++ and the fly likes C# - How to write a 2D array into a text file and open it back up? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Languages » C / C++
Bookmark "C# - How to write a 2D array into a text file and open it back up? " Watch "C# - How to write a 2D array into a text file and open it back up? " New topic
Author

C# - How to write a 2D array into a text file and open it back up?

Tom-Colin Kelly
Greenhorn

Joined: Dec 09, 2011
Posts: 27
Hello

I am currently coding in C#; very similar to Java, and i cannot for the life of me figure something out. I want to be able to save the contents of an array into a .txt file so that it can be opened up, this is so that i can save and open the programme, and the properties will all stay the same, if that makes sense?

currently i have just been looking around and trying out different things.

Here is what i have?



As you can see, the 2d array here is 'Names' and i want to be able to save this array into a text file with the click of a button, and also hopefully open it back up?

any help would be greatly appreciated, thanks.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: C# - How to write a 2D array into a text file and open it back up?
 
Similar Threads
Map text file to a 2 dimensional array.
Persistence causing problems with JButton 2D Array
2D array input of text file
Stored procdure return multi dimensional array?
I'm lost, need help using jtextarea, savedialog