2016-06-28 5 views

답변

5

사용이 :

string path = System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal); 
string filename = System.IO.Path.Combine(path, "testfile.txt"); 

// Write 
using (var streamWriter = new StreamWriter(filename, true)) 
{ 
    streamWriter.WriteLine(DateTime.UtcNow); 
} 

// Read 
using (var streamReader = new StreamReader(filename)) 
{ 
    string content = streamReader.ReadToEnd(); 
    System.Diagnostics.Debug.WriteLine(content); 
} 
+0

을 참조하는 정적 필드 내 범위에있는 GetFolderPath 방법이 없습니다입니다. 명확하고 철저한 범위를 지정해 주시겠습니까? –

+0

범위는 무엇입니까? Android 프로젝트? – jzeferino

+0

내 Xamarin 프로젝트의 Android 부분에서 사용하고 싶습니다. –

관련 문제