C# 删除 INI 文件:完整代码示例
下面是 C# 代码实现:
using System.IO;
string filePath = 'D:\Program Files\ServiceLog.ini';
if (File.Exists(filePath))
{
File.Delete(filePath);
}
这段代码使用 File.Exists 方法检查文件是否存在,如果存在,则使用 File.Delete 方法将其删除。
原文地址: https://www.cveoy.top/t/topic/jGar 著作权归作者所有。请勿转载和采集!