Проблема с FileStream в C# WPF

Сразу к делу. Дело в том, что при нажатии что то происходит не так, и приложение вылетает. Вообще я записал 3 string для путей к txt-файлам. Проблемы с одним FileStream нету.

        private void dark_theme_Click(object sender, RoutedEventArgs e)
    {
        using (FileStream fs = File.Create(path3))
        {
            Byte[] flstxt = new UTF8Encoding(true).GetBytes("true");
            fs.Write(flstxt, 0, flstxt.Length);
        }
        using (FileStream fs = File.Create(path2))
        {
            Byte[] flstxt = new UTF8Encoding(true).GetBytes("false");
            fs.Write(flstxt, 0, flstxt.Length);
        }
        using (FileStream fs = File.Create(path))
        {
            Byte[] flstxt = new UTF8Encoding(true).GetBytes("false");
            fs.Write(flstxt, 0, flstxt.Length);
        }
    }

Ответы (0 шт):