Imports System.IO
Public Class Tester
Public Shared Sub Main
Dim myDirectoryInfo As DirectoryInfo
myDirectoryInfo = New DirectoryInfo("c:\\Java_dev")
Dim myDirectoryInfos() As DirectoryInfo
Dim myDir As DirectoryInfo
Try
myDirectoryInfos = myDirectoryInfo.GetDirectories()
For Each myDir In myDirectoryInfos
Console.WriteLine(myDir.FullName)
Next
Catch ex As Exception
Console.WriteLine(ex.Message)
End Try
End Sub
End Class
|