격리 된 메모리를 파일 저장소로 변환 할 수 있습니까? Isolated Storage에서 데이터를 가져 와서 내 프로그램에서 이미 정의한 파일에 저장할 수있는 방법이 필요합니다.C#에서 파일 저장소로 분리 된 메모리를 변환하는 방법?
0
A
답변
1
다음 예는 격리 된 저장소 무엇을
string fileContent = string.Empty;
//Read file within IsolatedStorage
using (IsolatedStorageFile storage = IsolatedStorageFile.GetStore((IsolatedStorageScope.Domain | IsolatedStorageScope.Assembly | IsolatedStorageScope.User), null, null))
{
using (StreamReader reader = new StreamReader(storage.OpenFile("ReadMe.txt", FileMode.Open)))
{
fileContent = reader.ReadToEnd();
}
}
//Write to a textfile
File.WriteAllText(@"File path", fileContent);
+0
감사합니다. @ 쿠루 바난! –
+1
@securedeveloper 당신을 도왔습니다. – Kurubaran
을 의미합니까, 당신이 IsolatedStorage 내에서 텍스트 파일을 읽고 특정 위치에 쓸 수있는 방법을 보여줍니다? – Gun
IsolatedStorage에서 파일을 읽고 주어진 경로의 파일에 저장 하시겠습니까? – Kurubaran
@ 총 예 그렇습니다. 격리 된 저장소 –