在控件RichTextBox内输入的字符串如何存为string型变量内呢?
string str=richtext.Rtf.ToString();
结果输出来是一些乱七八糟的东西,请各位帮忙解决下,不胜感激!谢谢! 

解决方案 »

  1.   

    string str = richtext.Text;
      

  2.   

    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Windows.Forms;namespace MDI
    {
        public partial class Form1 : Form
        {
            public Form1()
            {
                InitializeComponent();
            }        private void button1_Click(object sender, EventArgs e)
            {
                string str;
                str = richTextBox1.Text;            richTextBox2.Text = str;
            }
        }
    }
      

  3.   

    string str = richtext.Text;