Imports System
Imports System.IO
Public Class MainClass
Shared Sub Main()
Dim curDir, nextDir As String
Try
curDir = Directory.GetCurrentDirectory()
Console.WriteLine(curDir)
For Each nextDir In Directory.GetDirectories(curDir)
Console.WriteLine(nextDir)
Next
Catch ioe As IOException
Console.WriteLine("i/o problems!" & ioe.Message)
Catch e As Exception
Console.Write(e.StackTrace)
Finally
Console.Write("Done")
End Try
End Sub
End Class
|