Imports System
Imports System.IO
Class Program
Public Shared Sub Main(ByVal args As String())
Dim dirPrograms As New DirectoryInfo("c:\program files")
Dim StartOf2009 As New DateTime(2009, 1, 1)
' LINQ query for all directories created before 2009.
Dim dirs = From dir In dirPrograms.EnumerateDirectories() Where dir.CreationTimeUtc < StartOf2009
For Each di As DirectoryInfo In dirs
Console.WriteLine("{0}", di.Name)
Next
End Sub
End Class