Save data to a text file to read later

Asked

Viewed 76 times

1

I wonder how I saved some data as example, in case numbers, in a text file so that when I close the application the data will still be saved and when I open them I can resume them.

  • How are the data. What do you want to do with them?

  • They are in text mode (string) and in numbers (double) in the case and a saving system that I want to do thank you.

  • This helps little but it seems that you are already satisfied. If you had put more details I would make an example for you want the right way to do it. But without detailed information, I can’t help you anymore.

  • All quiet man has given straight kkk thanks for the help !

2 answers

1


The strategy you want to use is something very simple: write the data to a file, and when re-opening the app, read the same data and put it in the right place.

C# (and the .NET framework) provides the class File for exactly this case. More documentation is found in this microsoft link.

  • Thank you very much helped me !

0

I suggest you search for XML files, in it you can organize the data from "tags" and then read them. Take a look at the System.Xml class

Browser other questions tagged

You are not signed in. Login or sign up in order to post.