Permanently deletes a file.
Namespace: System.IOAssembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax public override void Delete()
Exceptions Exception | Condition |
---|
IOException | The target file is open or memory-mapped on a computer running Microsoft Windows NT.-or-There is an open handle on the file, 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. |
SecurityException | The caller does not have the required permission. |
UnauthorizedAccessException | The path is a directory. |
See Also