Deletes this instance of a System.IO.DirectoryInfo, specifying whether to delete subdirectories and files.
If the DirectoryInfo has no files or subdirectories, this method deletes the DirectoryInfo even if recursive is false. Attempting to delete a DirectoryInfo that is not empty when recursive is false throws an System.IO.IOException.
For a list of common I/O tasks, see Common I/O Tasks.