I try to store some values through this sub in objPointList.
But, with the following code i receive an error: "Object reference not set to an instance of an object".
So i tried "Static objPointList(System.Byte.MaxValue) As New ZedGraph.PointPairList", but it doesn't work too: then i get an error about an array which cannot be declared with the new keyword.
Any help would be appreciated
PS i hope i posted this in the right forum...
But, with the following code i receive an error: "Object reference not set to an instance of an object".
VB.NET:
Private Sub UpdateGraph(ByVal YValue As Double, ByVal intPListIndex As Integer)
Dim PPDrawList As New ZedGraph.PointPairList
Static objPointList(System.Byte.MaxValue) As ZedGraph.PointPairList
Dim X As Double
If objPointList(intPListIndex).Count <> 0 Then
X = objPointList(intPListIndex).Item(objPointList(intPListIndex).Count - 1).X
Else
X = -1
End If
objPointList(intPListIndex).Add(X + 1, YValue)
PPDrawList.Add(X + 1, YValue)
zgcNetwork.GraphPane.AddBar("", PPDrawList, Color.DarkRed)
zgcNetwork.Refresh()
End Sub
So i tried "Static objPointList(System.Byte.MaxValue) As New ZedGraph.PointPairList", but it doesn't work too: then i get an error about an array which cannot be declared with the new keyword.
Any help would be appreciated
PS i hope i posted this in the right forum...