开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜