Visual Studio 2008을 사용하여 모바일 장치 용 응용 프로그램을 개발해야합니다. 응용 프로그램에서 파일을 읽고 작성해야합니다.모바일 장치 용 파일 작업 방법
문제점 모바일 장치 나 VS의 장치 에뮬레이터에서 응용 프로그램을 실행할 때 파일이 어디에 있는지 알 수 없습니다. PC에서 응용 프로그램을 실행하면 모든 것이 잘 작동합니다.
내가 무엇을해야하는지, 어디에서보아야할까요?
미리 감사드립니다.
내가 언급하지 않았다, 그것은 윈도우 모바일 6.5
P.S.위한거야 같은 StringBuilder에 작업을 시도 : 샌드 박스의 개념을 적용했습니다
StringBuilder sb = new StringBuilder();
using (StreamReader sr = new StreamReader("TestFile.txt"))
{
String line;
// Read and display lines from the file until the end of
// the file is reached.
while ((line = sr.ReadLine()) != null)
{
sb.AppendLine(line);
}
}
string allines = sb.ToString();
Windows Phone 7을 사용하는 경우 격리 된 저장소를 사용해야합니다.
using (var store = IsolatedStorageFile.GetUserStoreForApplication()) using (var stream = new IsolatedStorageFileStream("data.txt", FileMode.Create, FileAccess.Write, store)) { // Write to our file }
– tzerb