C# Visual Studio 2005中判断一个文件夹是否存在,则添加如下代码
string path = @"D:/CSharp大作业";
if (Directory.Exists(path))
MessageBox.Show("该文件夹已经存在!!!");
else
Directory.CreateDirectory(path);
string path = @"D:/CSharp大作业";
if (Directory.Exists(path))
MessageBox.Show("该文件夹已经存在!!!");
else
Directory.CreateDirectory(path);