Advertisement
DrAungWinHtut

save_txt_file.cs

Nov 11th, 2022
1,063
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.45 KB | None | 0 0
  1. using System.IO;
  2.  
  3. namespace TextEditor01
  4. {
  5.     public partial class frmEditor : Form
  6.     {
  7.         public frmEditor()
  8.         {
  9.             InitializeComponent();
  10.         }
  11.  
  12.         private void btnSave_Click(object sender, EventArgs e)
  13.         {
  14.             string sText = txtEditor.Text;
  15.             StreamWriter sw = new StreamWriter(@"I:\test\test.txt",true);
  16.             sw.WriteLine(sText);
  17.             sw.Close();
  18.  
  19.         }
  20.     }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement