Click or drag to resize
FileSystemInfoDelete Method
Deletes a file or directory.

Namespace: System.IO
Assembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax
C#
public abstract void Delete()
Exceptions
ExceptionCondition
DirectoryNotFoundExceptionThe specified path is invalid; for example, it is on an unmapped drive.
IOExceptionThere 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