0
What do you think is the best way to load and save data in C#?
I am thinking about the best way to load and save data into my C# programs, which way do you have the best experience with?
2 Answers
+ 4
What is the program's function? What type of data are you trying to load/save?
Most often, your best bet is a remote database that's on a server somewhere, especially if this program is intended for online usage. This allows you to easily, and securely, store/retrieve data that you need without having someone tamper with the data. As well, this allows it to be used from anywhere since it'll be able to access the data it needs regardless of your local device.
However, if it's a simple desktop app and you don't have plans to put it online or use it for things that require a bigger concern over protection/privacy of data, then you can easily store/retrieve data on the local machine. You could do that through a local database, text files, etc... Think of websites, they store/retrieve data locally through cookies, and they also store more important information on remote servers through a database (such as SQL/MySQL).
Hope that helps.
0
For databases MySQL is excellent. For storing class data easily JSON really shines. XML is great for stuff like user/application settings, and of course there is also straight up binary, which is useful for custom file formats and performance