Imports System
Imports System.IO
Imports Microsoft.VisualBasic
Public Class Test
Public Shared Sub Main()
Dim path As String = "c:\MyDir"
Try
If Directory.Exists(path) Then
Console.WriteLine("That path exists already.")
Return
End If
Dim di As DirectoryInfo = Directory.CreateDirectory(path)
Console.WriteLine("The directory was created successfully at {0}.", Directory.GetCreationTime(path))
di.Delete()
Console.WriteLine("The directory was deleted successfully.")
Catch e As Exception
Console.WriteLine("The process failed: {0}.", e.ToString())
End Try
End Sub
End Class