This article will show you how you can delete a folder which is containing any file using c#.net in windows application. So why I am writing this because if you try to delete any folder and that folder contains any file or folder it will throw and exception that folder contains some file.
So here is
the code.
if (Directory.Exists(folderpath))
{
Directory.Delete(folderpath,
true);
}
|
So check the
above highlighted part. I have passed it true. So if we pass this true then
only we will be able to delete the folder with some files.
Please let me know your comment................
Please let me know your comment................
0 comments:
Please let me know your view