windows phone how can I create and keep each instance saved at startup as read-only? Possibly in compile-time
windows phone how can I create and keep each instance saved at startup as read-only? Possibly in compile-time
I'm writing an application that shows a set of pages, filled with some information.
Being the structure of the pages very similar from each other, I was thinking to create a single Page and a class, say InformationClass.cs:
class InformationClass {
int id;
string contentTitle;
string contentText;
}
InformationClass could be a model for every page's content. In this way, I will instantiate different objects of this class, filled with different values for each page.
Now, assuming my reasoning is correct, how can I create and keep each instance saved at startup as read-only? Possibly in compile-time?
Should I write all the information into an unique XML or JSON file and then fill the pages from this source?
Thanks for your support
something like that
var list = new List<InformationClass>()
{
new Information Class() { contentTitle = "title A", contentText "bla bla" },
new Information Class() { contentTitle = "title B", contentText "bla bla" },
new Information Class() { contentTitle = "title C", contentText "bla bla" },
...
}