1
我嘗試使用下面的代碼來獲得在C#中的Visual Studio 2010的圖表中的一個點:如何引用圖表Windows窗體控件中的特定點?
chart1.Series[0].Points.Item[1]
,但我得到了以下錯誤:
Error 1 'System.Windows.Forms.DataVisualization.Charting.DataPointCollection' does not contain a definition for 'Item' and no extension method 'Item' accepting a first argument of type 'System.Windows.Forms.DataVisualization.Charting.DataPointCollection' could be found (are you missing a using directive or an assembly reference?)
但據稱Points
是一個DataPointCollection
應如微軟網頁上顯示的屬性Item
:
我在做什麼錯?
其實我有固定它:'chart1.Series [0] .Points [1] .YValues'因爲我不能讓它承認'項目' – deiviz