Using VB6 I had no problems drawing a polyline, but with VB Net I found trouble working with arrays.

I use the following example code:

Dim obj(3) As MapPoint.Location
Dim oShape As MapPoint.Shape

obj(1) = AxMappointControl1.ActiveMap.GetLocation(40, -8.2, 1000)
obj(2) = AxMappointControl1.ActiveMap.GetLocation(40.4, -8.3, 1000)
obj(3) = AxMappointControl1.ActiveMap.GetLocation(40.1, -8.5, 1000)

oShape = AxMappointControl1.ActiveMap.Shapes.AddPolyline(ob j)

Can anyone please tell me how to define an ArrayOfLocations that works!