使用迭代器 遍历文件信息的详解 上传者:zy35344 2021-01-17 01:12:59上传 PDF文件 24.77KB 热度 32次 1.迭代文件的行复制代码 代码如下: public static IEnumerable ReadLines(string fileName) { using (TextReader reader = File.OpenText(fileName)) { string line; if ((line = reader.ReadLine()) != null) { yield ret 下载地址 用户评论 更多下载 下载地址 立即下载 用户评论 发表评论