C# 我能';t对windows phone 8.1使用隔离存储设置

C# 我能';t对windows phone 8.1使用隔离存储设置,c#,visual-studio-2013,windows-phone-8.1,C#,Visual Studio 2013,Windows Phone 8.1,我在添加时出错 IsolatedStorageSettings appSettings = IsolatedStorageSettings.ApplicationSettings; 在my MainPage.xaml.cs中,单击按钮事件 错误: 找不到类型或命名空间名称“IsolatedStorageSettings”(是否缺少using指令或程序集引用?) 当前上下文中不存在名称“IsolatedStorageSettings” 我正在使用visual studio ultimate 20

我在添加时出错

IsolatedStorageSettings appSettings = IsolatedStorageSettings.ApplicationSettings;
在my MainPage.xaml.cs中,单击按钮事件

错误:

  • 找不到类型或命名空间名称“IsolatedStorageSettings”(是否缺少using指令或程序集引用?)

  • 当前上下文中不存在名称“IsolatedStorageSettings”

  • 我正在使用visual studio ultimate 2013(更新2)


    请帮助我使用
    Windows.Storage
    命名空间中的类。它们是通用应用程序(Windows Phone 8.1和Windows 8.1)的新功能

    如果希望数据始终保持在本地,请尝试

    但是,如果您不介意它们存储在漫游设置中(如果您使用通用应用程序,它们将在Windows 8.1中用于您的应用程序),您可以使用

    比如说,

    var localSettings = Windows.Storage.ApplicationData.Current.LocalSettings;
    if(localSettings.Values.ContainsKey("LocationConsent"))
    


    谢谢你的帮助,但我在msdn论坛上得到了一点帮助[。无论如何,谢谢你,兄弟…可能的副本
    var roamingSettings = Windows.Storage.ApplicationData.Current.RoamingSettings;
    if(roamingSettings.Values.ContainsKey("LocationConsent"))