Imports System
Imports System.IO
Public Class MainClass
Shared Sub Main()
Dim myDirectory As DirectoryInfo
myDirectory = New DirectoryInfo("C:\")
Dim aFile As FileInfo
For Each aFile In myDirectory.GetFiles
Console.WriteLine("The file named " & aFile.FullName & _
" has length " & aFile.Length)
Next
End Sub
End Class