IsolatedStorageSettings.ApplicationSettings.Remove(" userClient")删除所有对象

时间:2014-10-15 13:35:04

标签: c# caching windows-phone-8 isolatedstorage

在IsolatedStorageSettings.ApplicationSettings中我有5个字符串,在注销后我只想删除" userClient",但它会清除所有字符串。

private static void ClearAllAndGoToSignIn()
    {
        App.MainViewModel.UserDetails = new UserItem();
        App.MainViewModel.ReceiversList.Clear();
        App.MainViewModel.TimelineList.Clear();
        if (IsolatedStorageSettings.ApplicationSettings.Contains("userClient"))
        { IsolatedStorageSettings.ApplicationSettings.Remove("userClient"); }
        IsolatedStorageSettings.ApplicationSettings.Save();
        Storage.ClearStorage();

        Application.Current.Terminate();

    }

0 个答案:

没有答案