Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27158

VS 2005 Looping through openfiledialog.filenames

$
0
0
I'm currently using VS 2005 on my computer and I realized that I can't do:
Code:

Dim ofd As New OpenFileDialog
Dim str As String

If ofd.ShowDialog = .Ok Then
        For i As Integer = 0 to ofd.FileNames.Count - 1
                str = ofd.FileName
        Next
End If


I'm forced to use a For/Each instead of a For Loop like this:
Code:

Dim ofd As New OpenFileDialog
Dim someString As String

If ofd.ShowDialog = .Ok Then
        For Each str As String In ofd
                someString = str
        Next
End If

Is .count LINQ?

Viewing all articles
Browse latest Browse all 27158

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>