代码期间,将开发过程中比较好的内容做个珍藏,下面资料是关于C#判断指定目录是否存在,不存在就创建之的代码,希望能对各位有较大用。
if (Directory.Exists(spath))
{
}
else
{
DirectoryInfo directoryInfo = new DirectoryInfo(spath);
directoryInfo.Create();
}
代码期间,将开发过程中比较好的内容做个珍藏,下面资料是关于C#判断指定目录是否存在,不存在就创建之的代码,希望能对各位有较大用。
if (Directory.Exists(spath))
{
}
else
{
DirectoryInfo directoryInfo = new DirectoryInfo(spath);
directoryInfo.Create();
}