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.
↧