I need to get a number of value from a xml file into a chart. I’m trying to use enumerable range to that.
IEnumerable<Int32> seq = Enumerable.Range(0, 3).ToArray();
chart.Series["Series1"].Points.AddY(package[seq].value1);
But its saying that it cannot convert to ínt’. When I try
var seq = Convert.ToInt32(Enumerable.Range(0, 3).ToArray());
I get that it unable to cast object of type ‘System.Int32[]’ to type ‘System.IConvertible’ .
What to do?
chart.Series["Series1"].Points.AddYseems to only take anint, not anint[]. You’ll need to iterate over the range and add the points separately.