c# – 我不能对Windows Phone 8.1使用IsolatedStorageSettings
发布时间:2020-12-15 04:17:51 所属栏目:百科 来源:网络整理
导读:当我添加时,我收到错误 IsolatedStorageSettings appSettings = IsolatedStorageSettings.ApplicationSettings; 在我的MainPage.xaml.cs按钮点击事件. 错误: 找不到类型或命名空间名称“IsolatedStorageSettings”(您是否缺少using指令或程序集引用?) 当前
当我添加时,我收到错误
IsolatedStorageSettings appSettings = IsolatedStorageSettings.ApplicationSettings; 在我的MainPage.xaml.cs按钮点击事件. 错误: >找不到类型或命名空间名称“IsolatedStorageSettings”(您是否缺少using指令或程序集引用?) 我使用的是visual studio 2013(更新2). 请帮帮我 解决方法
使用Windows.Storage命名空间中的类.它们是Universal Apps(Windows Phone 8.1和Windows 8.1)的新功能.
如果您希望数据一直保持本地尝试 但是,如果您不介意他们存储在漫游设置中(如果您使用通用应用程序,它们将在Windows 8.1中可用于您的应用程序),则可以使用 例如, var localSettings = Windows.Storage.ApplicationData.Current.LocalSettings; if(localSettings.Values.ContainsKey("LocationConsent")) 要么 var roamingSettings = Windows.Storage.ApplicationData.Current.RoamingSettings; if(roamingSettings.Values.ContainsKey("LocationConsent")) (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |