方法1:
if (Directory.Exists("C://name"))
{
MessageBox.Show("存在");
}
else
{
MessageBox.Show("不存在");
}
方法2:
DirectoryInfo cc = new DirectoryInfo("C://name");
if (cc.Exists)
{
MessageBox.Show("存在");
}
else
{
MessageBox.Show("不存在");
}