Advertisement
JannickP8

SaveFile c#

Apr 7th, 2022
1,276
1
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.39 KB | None | 1 0
  1. SaveFileDialog saveFileDialog1 = new SaveFileDialog();
  2.             if (saveFileDialog1.ShowDialog() == DialogResult.OK)
  3.             {
  4.                 using (Stream s = File.Open(saveFileDialog1.FileName, FileMode.CreateNew))
  5.                 using (StreamWriter sw = new StreamWriter(s))
  6.                 {
  7.                     sw.Write(fastColoredTextBox1.Text);
  8.                 }
  9.             }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement