hi there,
was just looking for info on why I can't seem to get the last value from an arraylist of integers, my code looks like this:
I have sorted the arraylist so that the highest value is at the top, if I use
num = arrayListInfo.Item(i)
and give i a number like 5 then this works but it just appears to have a problem the last number for me...anyone any ideas...????
was just looking for info on why I can't seem to get the last value from an arraylist of integers, my code looks like this:
VB.NET:
'sort items in array
arrayListInfo.Sort()
Dim i, num As Integer
i = arrayListInfo.Count
i = i - 1
num = arrayListInfo.Item(i)
MsgBox("Your number " & num)
I have sorted the arraylist so that the highest value is at the top, if I use
num = arrayListInfo.Item(i)
and give i a number like 5 then this works but it just appears to have a problem the last number for me...anyone any ideas...????