private void button1_Click(object sender, EventArgs e)
        {
            string aa = this.richTextBox1.Text.Trim();
            StreamWriter sfile = new StreamWriter("E://123.txt");//写入到123.txt文件中
            sfile.Write(aa);
            sfile.Close();
            StreamReader ss = new StreamReader("E://123.txt");//读取文件123.txt中的内容
            this.richTextBox2.Text = ss.ReadLine();
            ss.Close();
        }

 

 posted on 2012-05-03 11:23  纳米程序员  阅读(203)  评论(0编辑  收藏  举报