Dim path As String = "c:\文件夹" Try
' Determine whether the directory exists.
If Directory.Exists(path) Then
Console.WriteLine("That path exists already.")
Return
End If ' Try to create the directory.
Dim di As DirectoryInfo = Directory.CreateDirectory(path)
Console.WriteLine("The directory was created successfully at {0}.", Directory.GetCreationTime(path)) ' Delete the directory.
di.Delete()
Console.WriteLine("The directory was deleted successfully.") Catch e As Exception
Console.WriteLine("The process failed: {0}.", e.ToString())
End Try
' Determine whether the directory exists.
If Directory.Exists(path) Then
Console.WriteLine("That path exists already.")
Return
End If ' Try to create the directory.
Dim di As DirectoryInfo = Directory.CreateDirectory(path)
Console.WriteLine("The directory was created successfully at {0}.", Directory.GetCreationTime(path)) ' Delete the directory.
di.Delete()
Console.WriteLine("The directory was deleted successfully.") Catch e As Exception
Console.WriteLine("The process failed: {0}.", e.ToString())
End Try
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货