Hi Guys,
Im more familiar with coding in C# ... can someone please help me to convert the line highlighted below into VB.NET
Much appreciated
private int file_count = 0;
///
/// Get the file count of a given directory recursively.
///
public void GetDirectoryFileCount(string dir)
{
dir = dir + @”\”;
//get all the directories and files inside a directory
String[] all_files=Directory.GetFileSystemEntries(dir);
//loop through all items
[B]foreach(string file in all_files)[/B]
{
//check to see if the file is a directory if not increment the count
if(Directory.Exists(file))
{
//recursive call
GetDirectoryFileCount(file);
}
else
{
//increment file count
file_count++;
}
}
}