storing multiple data types in a list
Hi ive been trying to create an inventory system for a while now but i believe the way im thinking it just cant be done
i want to create a list that holds multiple data types. i tried doing this with a class but when i wanted to make multiple lists they began sharing values because i was using a class. i tried using a struct but i couldn't edit values of the list as it creates a copy of the struct and does not work
is there anything else i can try
You can look at standard C# ways of doing these things. Classes can be copied, or you can read about how people are able to change the original structs in lists. You can also read about whether most people use a class or a struct for things like this.
It's a bit of work, but's it like learning multiplication only for games about cats. No such short-cut.
I also moved this into the HelpRoom, which is more for semi-opinions and personal help.