合集-C#文件操作

摘要:title: 文件的读取和写入 date: 2022-12-09T15:59:55Z lastmod: 2022-12-09T16:16:14Z 文件的读取和写入 读取文件 方法 说明 ​File.ReadAllText(FilePath);​ 读取指定路径的文件 ​File.ReadAllText 阅读全文
posted @ 2023-10-04 15:50 天空之城00 阅读(54) 评论(0) 推荐(0)
摘要:title: 文本读取和写入流 date: 2022-12-10T11:04:15Z lastmod: 2022-12-10T11:30:02Z 文本读取和写入流 文本流的创建 直接创建 StreamReader reader = new StreamReader(@"E:\file.zip"); 阅读全文
posted @ 2023-10-04 15:51 天空之城00 阅读(44) 评论(0) 推荐(0)
摘要:title: FileMode,FileAccess 的参数释义 date: 2022-12-09T16:20:46Z lastmod: 2022-12-09T16:21:17Z FileMode,FileAccess 的参数释义 首先,FileMode,FileAccess都是枚举类型。 一:Fi 阅读全文
posted @ 2023-10-04 15:51 天空之城00 阅读(452) 评论(0) 推荐(0)
摘要:title: FileInfo 和 DirectoryInfo date: 2022-12-09T15:24:08Z lastmod: 2022-12-09T16:12:53Z FileInfo 和 DirectoryInfo 通过 FileInfo​ 和 DirectoryInfo​ 类来读取文件 阅读全文
posted @ 2023-10-04 15:51 天空之城00 阅读(109) 评论(0) 推荐(0)