If you are talking about Filling an array with filenames, loops aren't necessary for that in vb.net.
Code:
' Create an array representing the files in the current directory.
Dim fi As System.IO.FileInfo() = di.GetFiles()
Dim fiTemp As System.IO.FileInfo
For Each fiTemp In fi
msgbox fiTemp.Name
Next fiTemp