S
sas.dean
Hi,
I'm having a problems with the following code. The line
"items.Add(collListViews(i))" gives me a NullReferenceException and I
don't really know why..
Private Function sort(ByVal priority As Integer, ByVal items As
ArrayList)
Dim i As Integer = 0
' while all listviewitems haven't been looped through
' colllistviews is an array of listviewitems 100 big but only has data
in 0-4
While i < collListViews.Length
' if priorities match
If collListViews(i).SubItems.Item(2).Text = priority Then
' add that item to test arraylist
' get null reference exception here
items.Add(collListViews(i))
End If
i += 1
End While
Return items
End Function
Any ideas?
I'm having a problems with the following code. The line
"items.Add(collListViews(i))" gives me a NullReferenceException and I
don't really know why..
Private Function sort(ByVal priority As Integer, ByVal items As
ArrayList)
Dim i As Integer = 0
' while all listviewitems haven't been looped through
' colllistviews is an array of listviewitems 100 big but only has data
in 0-4
While i < collListViews.Length
' if priorities match
If collListViews(i).SubItems.Item(2).Text = priority Then
' add that item to test arraylist
' get null reference exception here
items.Add(collListViews(i))
End If
i += 1
End While
Return items
End Function
Any ideas?