I have a class called Car which takes the parameters (string build, string manufacturer, string colour). I also have a list of Cars, in which all cars are stored. The cars are displayed in a form, along with their data. Everything works correctly. I have two forms, the main form which displays the cars, and another form where it is possible to add a new car, or modify an existing one.
On the first form, it is possible to right click a car and select edit. I am trying to pass an instance of the selected car from the first form, to the second form. It expects 1 parameter (Car selectedCar). I am finding it difficult however to send the instance to the second form where it is possible to modify the build, manufacturer, colour, ect. How can I go about this? I have been trying for hours and it is boggling my mind.
I will highly appreciate any help, thank you for your time.
Aucun commentaire:
Enregistrer un commentaire