private void DeleteD(string name)
{
try
{
string path = AppDomain.CurrentDomain.BaseDirectory.Trim() + name;
DirectoryInfo DirInfo = new DirectoryInfo(path);
DirInfo.Attributes = FileAttributes.Normal & FileAttributes.Directory;
Directory.Delete(path);
}
catch
{ }
}
{
try
{
string path = AppDomain.CurrentDomain.BaseDirectory.Trim() + name;
DirectoryInfo DirInfo = new DirectoryInfo(path);
DirInfo.Attributes = FileAttributes.Normal & FileAttributes.Directory;
Directory.Delete(path);
}
catch
{ }
}
本文转自94cool博客园博客,原文链接:http://www.cnblogs.com/94cool/archive/2009/11/11/1601128.html,如需转载请自行联系原作者