jeenma  

参考:https://blog.csdn.net/weixin_40068689/article/details/82117031?utm_source=blogxgwz3

foreach(string str in System.IO.File.ReadAllLines("d:\123.txt", Encoding.Default)
{
Console.WriteLine(str); // str就是每一行数据
}

 

posted on 2020-06-22 09:38  jeenma  阅读(6762)  评论(0编辑  收藏  举报