How to convert richtextbox to string in C#

1 Answer

0 votes
namespace WinFormsApp1
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            string str = richTextBox1.Text;

            label1.Text = str;
        }
    }
}




/*
 * run:
 *
 * aaa
 * bbb
 * ccc
 * ddd
 * eee
 * 
 */

 



answered Aug 21, 2023 by avibootz
...