我正在尝试获取每个文件的文件名和完整路径,下面的代码段搜索“foo”文件夹中的所有文件夹并将文件名输出为ListBox
.
Dim di As New DirectoryInfo("C:\\foo")
Dim diar As FileInfo() = di.GetFiles("*.*", SearchOption.AllDirectories)
Dim dra As FileInfo
For Each dra In diar
ListBox.Items.Add(dra)
ListBox1.Items.Add(would be full path here)
Next
但是我也想输出每个文件的完整路径,ListBox1
我该怎么做呢?