P
Phillip Taylor
I'm having a problem with this code. I can't really understand why it
won't work if, for example, I pass in a linked list of 0 records.
Public Sub ConversionUpdateComplete(ByRef records As LinkedList(Of
ListViewItem))
If (Me.InvokeRequired) Then
Dim method As New MigrationCompleteEventHandler(AddressOf
ConversionUpdateComplete)
Me.Invoke(method, New Object() {records})
Else
lvUpdateSuggestions.Items.Clear()
For Each l As ListViewItem In records
lvUpdateSuggestions.Items.Add(l)
Next
lvUpdateSuggestions.View = True
pbConverting.Visible = False
lblConversionWait.Visible = False
lblSuggestionNotice.Visible = True
btnNext.Enabled = True
End If
End Sub
won't work if, for example, I pass in a linked list of 0 records.
Public Sub ConversionUpdateComplete(ByRef records As LinkedList(Of
ListViewItem))
If (Me.InvokeRequired) Then
Dim method As New MigrationCompleteEventHandler(AddressOf
ConversionUpdateComplete)
Me.Invoke(method, New Object() {records})
Else
lvUpdateSuggestions.Items.Clear()
For Each l As ListViewItem In records
lvUpdateSuggestions.Items.Add(l)
Next
lvUpdateSuggestions.View = True
pbConverting.Visible = False
lblConversionWait.Visible = False
lblSuggestionNotice.Visible = True
btnNext.Enabled = True
End If
End Sub