WinForm中在textbox中输入的文字如何保存成txt文件?

解决方案 »

  1.   

    using(StreamWrite sw = new StreamWrite("E:/1.txt",false))
    {
        sw.Write(this.TextBox1.text);
    }
      

  2.   

    要加分啊!
    嘻嘻~~~
    你当然先引用using System.IO;
    string b=this.textbox.tex;
    filestream fs=file.open("要存入的文本文件",filemode.creatoropen,fileAcuess.write);
    steamWriter sw=new steamwriter(fs,encording.defalut);
    sw.writertoend(b);
    fs.fulsh();
    fs.close();
    好,就这样哦,不过上面可能有单词写错了!所以见谅啊?