best way to store a list of objects throw several pages in wp7 development
i have e.g. a class like:
public class Person
{
public string name { get; set; }
public int age { get; set; }
}
now i have to access a list of type List<Person>
in several pages. so i implemented a singleton class which stores this informations.
is there a better solution, or does i m开发者_如何学运维ake it right?
As with most questions of this type, it depends on the app.
A common practice for objects/lists which are required by multiple pages it to have an application level view model and reference this from each page.
精彩评论