简体   繁体   中英

How to store Multiple categories in C#

I'm working on a C# project for a class and my assignment is to make a forms app that looks like the Carvana website. For instance, if the user picks Nissan only Nissan cars come up and if you change the body type to trucks only Nissan trucks show up. Also, each model has additional information about them such as the truck is 4-wheel drive, etc. I was going to use a jagged array, but I don't think that's the best way so I'm kind of stuck. Thank you for any help

So far I have only used arrays and I tried Enums for the makes and that works for what I wanted to use them for. Also I'm using combo boxes for the pull-down menu

You can store your data in an XML or JSON object. Easy to append. Easy to search.

If you want to stick with something similar you are already using, You better use an object Dictionary .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM