I'm currently writing a Windows Store app, and it requires me to include a relative large amount of static data (~1000 different records, each needs a few ints associated). I'm not sure how to approach the problem.
What is a good way to store all this data? It will never be changed in the app as it won't need to be updated.
Have you thought of using Resource Files ?
Althought they are commonly used for Localization strings, you can pretty much use them for any need such as yours (storing large amounts of static text, or even images).
Also, you can compile the resource file into a binary and include it in your production assembly, for performance and maintenance reasons. See last part of link #3 above.
I would recommend using a Collection to store all the data.
eg
public const List<string> DATA = new List<String>()
{
"Data1","Data2","Data3","Data4", "Data5", "Data6"
};
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.