2011-05-08 2 views

답변

2

영구 저장소를 IsolatedStorage에 저장하려고합니다. 개요 및 사용 방법에 대한 예는 IsolatedStorage here에서 볼 수 있습니다. this site에는 다양한 유형의 개체를 저장하는 방법을 보여주는 다양한 예제가 있습니다.

1

다음은 문자열을 저장하는 예제이지만 모든 유형의 객체를 이러한 방식으로 저장할 수 있어야합니다. 당신의 참조에 IsolatedStorage를 추가

using System.IO.IsolatedStorage; 

를 클래스에서 :

private string myString; 

을로드 이벤트에서 귀하의 페이지 : 나중에

try 
{ 
    myString = (string)IsolatedStorageSettings.ApplicationSettings["myString"]; 
} 
catch 
{ 
    IsolatedStorageSettings.ApplicationSettings.Add("myString", "this value is a string"); 
} 

과를 저장할 때

IsolatedStorageSettings.ApplicationSettings["myString"] = myString; 
0

이 예제 코드를 뒤에 추가해보십시오. IsolatedStorageSettings.ApplicationSettings.save