You are on page 1of 1

using (var sfd = new SaveFileDialog())

{
sfd.InitialDirectory = "::{20D04FE0-3AEA-1069-A2D8-08002B30309D}";
sfd.Filter = "Text (*.txt)|*.txt|All (*.*)|*.*";
sfd.FilterIndex = 1;

if (sfd.ShowDialog() == DialogResult.OK)
{
File.WriteAllText(sfd.FileName, textBox1.Text);
}
}

You might also like