回答

9

此代碼似乎爲我工作:

String s = "hello"; 
Byte[] bytes = Encoding.UTF8.GetBytes(s); 

using (Stream f = await ApplicationData.Current.LocalFolder.OpenStreamForWriteAsync 
    ("hello.txt", CreationCollisionOption.OpenIfExists)) 
{ 
    f.Seek(0, SeekOrigin.End); 
    await f.WriteAsync(bytes, 0, bytes.Length); 
} 
+0

謝謝!我已經找到了它,但無論如何我正在接受你的答案。 – Nagg

+0

另一個整潔的解決方案在這裏:http://stackoverflow.com/questions/14711453/appending-text-to-file-windows-store-apps-windows-rt –

相關問題