16,554
社区成员
发帖
与我相关
我的任务
分享
//如何在textbox里显示txt文件的内容
04. string path = @"D:/test.txt";//读取文件txt
06. using (FileStream fs = new FileStream(path, FileMode.Open))
07. {
08. using (StreamReader sr = new StreamReader(fs))
09. {
10. while (!sr.EndOfStream)
11. {
12. string sLine = sr.ReadLine();
13. if (sLine.Length < 1)
14. {
15. continue;
16. }
17. string sRecordKbn = sLine;//获取你的SQL
20. }
21. }
22. }