A
Al Reid
I'm using VB 2005.
I have a production application where I load a ListView with information from several sources based on user interaction. At some
point I need to iterate through the Items collection and print the documents that have been requested. The contents of the ListView
are never sorted or manipulated in any way. Occasionally the documents print out of order.
Is it possible that:
For Each li as ListViewItem in DocsListView.Items
'...some code
Next
Will retrieve the ListView Items in an order that is different than:
For i as Integer = 0 to DocsListView.Items.Count -1
Dim li as ListViewItem = DocsListView.Items(i)
'...some code
Next
The problem seems to be infrequent, random and non-reproducible. Any thoughts before I modify the application?
TIA,
I have a production application where I load a ListView with information from several sources based on user interaction. At some
point I need to iterate through the Items collection and print the documents that have been requested. The contents of the ListView
are never sorted or manipulated in any way. Occasionally the documents print out of order.
Is it possible that:
For Each li as ListViewItem in DocsListView.Items
'...some code
Next
Will retrieve the ListView Items in an order that is different than:
For i as Integer = 0 to DocsListView.Items.Count -1
Dim li as ListViewItem = DocsListView.Items(i)
'...some code
Next
The problem seems to be infrequent, random and non-reproducible. Any thoughts before I modify the application?
TIA,