For my Game Programming class, I create a class for the player character. The player can collect bonuses throughout the game, which are held and can be used whenever the player chooses.
I thought a dynamic array would work fine, but my background is in C ++ (we use Unity in a class that uses Java and C #), and I know that freeing up memory is handled differently in C # (I know that there is a garbage collector, but actually knows very little about how it functions). After browsing the website for a while, I could not find anything that seemed to correspond to the functionality I needed (or, if I did, it was above my head, and I did not realize it).
If someone could specify a C # structure or structures that would be good for storing a growing set of objects, that would be very helpful.
source share