foreach(System.IO.FileInfo file in dir.GetFiles()) 

string name=file.Name.Substring(0,file.Name.LastIndexOf("."));
string pathrep=ConfigurationSettings.AppSettings["pathrep"];
StreamReader  rs = new  StreamReader(paths2+file.Name,System.Text.Encoding.Default);
StreamWriter st = File.CreateText(pathrep+name+".txt");
         string s=rs.ReadToEnd();
MessageBox.Show(s);
st.Write(s);
}
大家请看这个函数,为何我MessageBox.Show出来能把所有字符输出来,可是Write到文本文档中就不能完全输出?总是缺少一快!

解决方案 »

  1.   

    欢迎光监点石成金网 http://www.boxigroup.com 网站提供web开发(j2ee .net asp php javascript、c#等) c/s开发(delphi、vb、vc、pb、cb等) 数据库开发(oracle、sqlserver、db2、access、mysql、Postgresql、informix)等学习资料,希望能为你解决燃眉之急 ,请把本网站加入收藏夹,以备不时查询之需 bs+cs讨论群(9638134)
      

  2.   

    StreamWriter ss = new StreamWriter(加重载试试,里面有很多方式)