Imports System
Imports System.IO
Public Class MainClass
Shared Sub Main()
Dim fileName As String
fileName = "C:\"
Dim directoryList As String() ' array for directories
Dim i As Integer
directoryList = Directory.GetDirectories(fileName)
Console.WriteLine("Directory contents:" )
' output directoryList contents
For i = 0 To directoryList.Length - 1
Console.WriteLine( directoryList(i) )
Next
End Sub ' Main
End Class
|