내 Windows Phone 7 프로젝트에서 IsolatedStorageSettings 클래스를 키 값 저장소로 사용하여 내 응용 프로그램의 사용자 기본 설정과 로그인 자격 증명을 기억합니다.Windows Phone 7, IsolatedStorageSettings "제거()"가 작동하지 않고 버그가 있습니까?
문제는 키를 사용하여 Remove(string)
메서드를 호출 한 다음 Save()
메서드를 사용하여 변경 내용을 유지하는 것입니다. Remove()
메서드가 true
을 반환하면 값이 삭제된다는 의미입니다. 그러나 다음에 가치를 얻으려고 할 때, 나는 그것이 여전히 존재하고 삭제되지 않았 음을 알게됩니다.
if (isolatedStore.Contains(key))
{
isolatedStore[key] = null;
}
bool del = isolatedStore.Remove(key);
isolatedStore.Save();
내가 isolatedStorage
인스턴스를 얻는 방법은 다음과 같습니다 :
private IsolatedStorageSettings isolatedStore =
IsolatedStorageSettings.ApplicationSettings;
이 어디 문제가 생각
여기에 내가 삭제를 위해 사용하는 코드가 있어요?
문제는 응용 프로그램에서 ** else **입니다. –
도움이되는지 확인하십시오. http://stackoverflow.com/questions/3145803/windows-phone-7-config-appsettings –
베타 망고 또는 이전 버전을 타겟팅하고 있습니까? 제거를 호출 할 때 null 값의 영향을 키로 제거하면 키와 값이 모두 삭제됩니다. – Waleed