Xamarin- StreamWriter

问题描述 投票:0回答:1

我需要向Tabulka.txt换行,但是只有Rewriting可以帮我吗?

        StreamWriter srt = new StreamWriter(System.IO.Path.Combine(path, "Tabulka.txt"));

        srt.WriteLine(Intent.GetStringExtra("ulozeno"));
        srt.Close();
        StreamReader srt2 = new StreamReader(System.IO.Path.Combine(path, "Tabulka.txt"));
        text2.Text = text2.Text + srt2.ReadToEnd();
        srt2.Close(); 
c# xamarin.android
1个回答
0
投票

尝试一下

StreamWriter srt = new StreamWriter(System.IO.Path.Combine(path, "Tabulka.txt"),append:true);
© www.soinside.com 2019 - 2024. All rights reserved.