paulthepaddy
Well-known member
Hi all, i am having problems with an array, as afar as i can tell the code im using is pretty simple and should be working... but its not.
breif: i have a class called car which has a string array in it 'Damage()'
the array get filled with item from a listbox using this code
breif: i have a class called car which has a string array in it 'Damage()'
the array get filled with item from a listbox using this code
VB.NET:
For i = 0 To CheckedListBox_Car.Items.Count - 1
car1.damage(i) = (CheckedListBox_Car.Items.Item(i))
Next[/CODE}
but i am getting this error.
Object reference not set to an instance of an object.
i honestly dont understand what exactly this means, but when i add a fixed value to the array eg damage(10) it works
CheckedListBox_Car does have items as i does have a value, so i dont know how to fix this