Запись в файл c++-cli

Мой код просто дописывает в файл строку из textBox3, но надо что бы записывал, то есть что бы не было предыдущих записей.

using namespace System::IO;

private: System::Void button4_Click(System::Object^ sender, System::EventArgs^ e) {

    StreamWriter^ f = gcnew StreamWriter("Result.txt", true);
    f->Write(textBox3->Text);
    f->Write("\n");
    f->Close();
    MessageBox::Show(this, "Запись в файл выполнена", "Сообщение", MessageBoxButtons::OK, MessageBoxIcon::Information);
}

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

Автор решения: Blackmeser
StreamWriter^ f = gcnew StreamWriter("Result.txt", false);
→ Ссылка