Android API 19: как отключить зеркалирование экрана?

На самом деле только ответ Джона (сент. 5'11 в 9:37) с BaseStream.Seek работал для моего дела. Спасибо, Джон! Мне нужно было добавить строки в zip-архив txt-файл.

using (FileStream zipFS = new FileStream(@"c:\Temp\SFImport\test.zip",FileMode.OpenOrCreate))
{
    using (ZipArchive arch = new ZipArchive(zipFS,ZipArchiveMode.Update))
    {
        ZipArchiveEntry entry = arch.GetEntry("testfile.txt");
        if (entry == null)
        {
            entry = arch.CreateEntry("testfile.txt");
        }
        using (StreamWriter sw = new StreamWriter(entry.Open()))
        {
            sw.BaseStream.Seek(0,SeekOrigin.End);
            sw.WriteLine("text content");
        }
    }
}
0
задан Destiny Faith 16 January 2019 в 18:16
поделиться