Quantcast
Channel: Answers by "brunopava"
Viewing all articles
Browse latest Browse all 64

Answer by brunopava

$
0
0
I guess you are trying to access a null reference on your list. See, when you call: **ProfileData data= new ProfileData();** You create an instance of ProfileData, but the list itself has no values assigned to it. So you have a list of empty values. When you call **data.CarpartsList[CurrentCar].currBodykit=currBodykit;** You are trying to access the property CarpartsList, which is a list with null values. So **CarpartsList[CurrentCarr]** equals null, and has no **currBodykit** property. In order to correct this, first you need to create new instances of **CarParts** and add to your list. Then you can access them and change values.

Viewing all articles
Browse latest Browse all 64

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>