操作文件
Dotnet专栏
公众号:Dotnet专栏
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
C# 获取盘符可用大小
获取到的是字节,比如你想和 500M 相比,则 boo bResult = GetHardDiskFreeSpace("C") > 500 * 1024 *1024; /// <summary> /// 获取磁盘空间大小(单位字节) /// </summary> /// <param name="str_HardDiskName">磁盘名称</param> /// <returns&原创 2022-05-11 15:46:40 · 916 阅读 · 0 评论 -
c# 打开文件夹并选中文件
下面展示一些 内联代码片。 打开文件夹 string ExplorPath = "你的文件夹路径"; if (Directory.Exists(ExplorPath)) System.Diagnostics.Process.Start(ExplorPath); 打开文件夹并选中某个文件 string ExplorPath = "你的文件夹路径"; string FilePath = "你的文件路径,需要带文件后缀"; if (Directory.Exists(ExplorPath)原创 2022-03-02 17:08:47 · 1903 阅读 · 0 评论
分享