How To Export RichTextBox Text To Txt File In C#
In This C# Tutorial We Will See How To Write RichTexBox Text Into Txt File In CSharp
Programming Language .
Project Source Code:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.IO;
namespace WindowsFormsApplication1
{
    public partial class Export_Text_To_Text_File : Form
    {
        public Export_Text_To_Text_File()
        {
            InitializeComponent();
        }
        private void BTN_EXPORT_Click(object sender, EventArgs e)
        {
            TextWriter writer = new StreamWriter(@"C:\folder\Text.txt");
            writer.Write(richTextBox1.Text);
            writer.Close();
        }
    }
}
1 comments:
commentsWork
Reply