VB2005: I’ve been looking for several hours on a good example and i found some but unfortunately they are for VB2008+. Im currently working in VB2005 so it seems like this was harder to do in that release.
I have a class for a point
Public Class cPoint
Public Speed As Integer
Public Alt As Integer
Public Status As String = ""
Public Err As String = ""
End Class
I populate a list of points with MyPoints=List(of cPoint). Now all i need to do is find the first match with a supplied speed and alt. I tried
Dim p As cPoint = MyPoints.Find(Function(item As cPoint) item.Speed = 85)
But that doesn’t work in VB2005 much less work with more than 1 filter. I just cant seem to find a good example that works in VB2005. I could iterate through the list but its kind of big and not very efficient. Any tips on how i can do this in VB2005?
~agp
VB.Net 2005 lacks lambda support hence that style of query won’t work. The simplest version that will is to manually iterate with a
For Eachloop.