0

У меня не получается при нажатии на кнопку написать одну строку в файле

private void button1_Click(object sender, EventArgs e)
        {
            if (toolStripTextBox1 != null)
            {
                ((WebBrowser)tabControl1.SelectedTab.Controls[0]).Navigate(toolStripTextBox1.Text);
                string lines = toolStripTextBox1.Text;
                File.AppendAllLines (@"C:\DB\History\dbhistorybeta.txt", lines);
            }
            else
            {

            }
        }

1 ответ 1

1
File.AppendAllText(@"C:\DB\History\dbhistorybeta.txt", lines);

Ваш ответ

By clicking “Отправить ответ”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Всё ещё ищете ответ? Посмотрите другие вопросы с метками или задайте свой вопрос.