I'm trying to write a simple VB program to read the file names in a given directory. This is what I've written:
Imports System
Imports System.IO
Imports System.Text
Module Program
Sub Main(args As String())
Dim FolderPath As String = 'C:\Users\uarenet\Downloads\Projects\Mock_Tables\_ExcelTables'
Dim FileNames As String() = Directory.GetFiles(FolderPath)
For Each FileName As String In FileNames
Console.WriteLine(FileName)
Next
End Sub
End Module
For some reason Visual Studio is not recognizing the line Dim FileNames....
statement, and, because of this, refuses to process the For Each....
statement.
Thanks in advance for any help or suggestions you can offer.