Simple Tip: Enumerating Files in a folder
Asked how to enumerate files in a folder, VB6 folks would emphatically say Dir function. Though Dir and other VB6 functions like Mid, Split etc are still supported in .NET through the Microsoft.VisualBasic namespace, they should ideally not be used as they are not supported on the Compact framework. So, the DirectoryInfo class has to be used instead. Here's how:
Dim dir As New DirectoryInfo("<>")
Dim file As FileInfo
For Each file In dir.GetFiles
'Do something with the fileinfo object
Next