File和Directory

File和Directory是静态类

using System.IO;
File.Exists(@"C:\1.txt");//判断文件是否存在
Directory.Exists(路径);//判断文件夹是否存在

首页 我的博客
粤ICP备17103704号