I am using MSChart and I am creating array like this
DataPoint[] datapoint = new DataPoint[10];
datapoint[0].SetValueY(86);
but it is giving error
NullReferenceException: Object
reference not set to an instance of an
object.
Why is it giving error?
Your array initially contains 10
nullreferences. You have to populate it with actual object references before using it. Try something like: