Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

Ading a counter to a For Each loop

$
0
0
So, i have this little For Each loop:
Dim search As New GwebSearchClient("")
        Dim results As IList(Of IWebResult) = search.Search(TextBox1.Text, 4, Nothing, Nothing, Nothing, Nothing, Nothing)
        ListBox1.Items.Clear()
        For Each result As IWebResult In results
            ListBox1.Items.Add(result.Title & result.Content & result.Url)
        Next

I would like to know if there is a way to add a counter to it, because i have a
  Dim url(4) As String
variable where url(0) is the result.Url of the first website and url(2) is the result.Url of the second website and so on.
How can i do this?

Viewing all articles
Browse latest Browse all 51036

Trending Articles



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