' Collection of code snippets by Arne Vajhøj 
' (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
Imports System
Imports System.IO

Class MainClass
    Public Shared Sub lookup(ByVal dir As String)
        Dim files As String() = Directory.GetFiles(dir)
        For Each f As String In files
            Console.WriteLine(f)
        Next
        Dim dirs As String() = Directory.GetDirectories(dir)
        For Each d As String In dirs
            lookup(d)
        Next
    End Sub
    Public Shared Sub Main(ByVal args As String())
        lookup("C:\WINNT")
    End Sub
End Class 
