日期:2014-05-18 浏览次数:21023 次
OpenFileDialog ofd = new OpenFileDialog();
if (ofd.ShowDialog() == System.Windows.Forms.DialogResult.OK)
{
using (StreamReader sr = new StreamReader(ofd.FileName))
{
textBox1.Text = sr.ReadToEnd();
}
}
------解决方案--------------------
StreamReader 就是读取流,同2楼方法
------解决方案--------------------
http://www.cnblogs.com/yank/archive/2007/11/16/961878.html,
你去看看这篇文章吧,比较清晰
------解决方案--------------------
用Write没错,就是要先移到文件末层再写,FileStream 就那么几个方法,一看便知道了!