FileSystemInfoDelete Method |
Deletes a file or directory.
Namespace: System.IOAssembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax public abstract void Delete()
Exceptions Exception | Condition |
---|
DirectoryNotFoundException | The specified path is invalid; for example, it is on an unmapped drive. |
IOException | There is an open handle on the file or directory, and the operating system is Windows XP or earlier. This open handle can result from enumerating directories and files. For more information, see How to: Enumerate Directories and Files. |
See Also