What is the equivalent of an app.config in a WinRT app?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-06 13:37:40

I'm not sure this is a duplicate of an existing SO question as Victory points out (as I don't think that was totally answered as well).

app.config in .NET provided a way to have some "init" type values and those were easily accessible via System.Configuration APIs. System.Configuration is not a part of the NETFX Core profile so this automatic wire-up is not possible. Consider that app.config was just XML and the APIs presented a deserialized view of that you could accomplish the same thing.

I would put your config in the format you want (xml, json) then when your app starts you can deserialize that into a strongly typed class if you wanted or just use the XML/JSON APIs to load up and query the particular node that you want.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!