I’m using zedgraph and the following code works fine in Visual Studio 2008 with the project targeting .NET 2.0 to create a list of different x,y points:
Dim coordList As New List(Of PointPairList)
For i As Integer = 0 To 10
coordList.Add(New PointPairList())
Next
I’ve tried the exact same code in Visual Studio 2010 in a project targeting .NET 4 as i need to use memory maps, but i can’t populate the list; it says
(0) = Count = (Count) threw an exception of type System.TypeLoadException.
Error – no children available
How come the list works in VS2008 (.NET2) but not in VS2010 (.NET4)?
Edit: The original code below works fine in VS2010(.NET4), it’s just that i can’t create a list of pointpairlists:- Dim coordList As New List(Of PointPairList)
Original code:
Dim list1 As New PointPairList()
For i As Integer = 0 To 10
list1.Add(x, y1)
Next
Edit 2: Here’s a picture of error which appears before it hits the loop:

The code is working fine. The
PointPairListiterator is throwing an exception because you left thePointPairListempty.Example … (this will not show an error when you view the values after the outer loop)