/*从文本中读取文件*/



这个我刚做过:我也是和你一样,最后看帮助看到的:
System.IO.StreamReader st;
//从.txt中读文件
st=new System.IO.StreamReader(openFileDialog1.FileName,System.Text.Encoding.Default );
//将读出来的文本赋给文本框
richTextBox1.Text=st.ReadToEnd();
//关闭对象
st.Close ();
posted @ 2004-04-07 11:19  thanks  阅读(633)  评论(0编辑  收藏  举报