I need help with the last part of an assignment
I´m a student from Sweden studying c# and i´m making a product manager.
The part i´m struggling with is removing a specific product from a list.
How the console program works, we have a menu option 1-6
option 1 Create product
option 2 display product
option 3 Create category
option 4 Place product in category
option 5 show category and products in it
I don´t have a problem with removing the product from the product dictionary. But the problem is that the product i removed still shows up when i choose option number 5. sorry if my explaining is bad, English is my second language.
I don´t have a problem with removing the product from the product dictionary. But the problem is that the product i removed still shows up when i choose option number 5. sorry if my explaining is bad, English is my second language.
9 Replies
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
The removed product still shows up under the category yes
Would have been easier if I could upload the code
Can't you? Via https://gist.github.com
Ye I’ve made a repository will just link it
just a shot in the dark, but i guess you have to remove the product from the category, too
not just from the product list/dict
Exactly
@adoma you'll need to remove from the categories as well when removing an option from the product dictionary.
I’ve tried with categoryList.remove but it removes the whole category and every product in it