Visual Basic (Declaration) | |
---|---|
Public Overloads Shared Function DeleteDirectory( _ ByVal directory As DirectoryInfo, _ ByVal raiseErrors As Boolean _ ) As Boolean |
Visual Basic (Usage) | ![]() |
---|---|
Dim directory As DirectoryInfo Dim raiseErrors As Boolean Dim value As Boolean value = Utilities.DeleteDirectory(directory, raiseErrors) |
C# | |
---|---|
public static bool DeleteDirectory( DirectoryInfo directory, bool raiseErrors ) |
C++/CLI | |
---|---|
public: static bool DeleteDirectory( DirectoryInfo^ directory, bool raiseErrors ) |
Parameters
- directory
- The directory that must be deleted.
- raiseErrors
- Specifies whether exceptions must be raised if an error occurred and prevented the deletion of the directory.
Return Value
The directory has been successfully deleted.Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2