0

I have a struct called: "BaseSprites" I have some kind of list of BaseSprites called: "BaseSpritesList" When my program loads in data, I want it to populate 'BaseSpritesList' by reading the contents of the folder it is loading from. I want it to add 1 'BaseSprites' for each subfolder. The name of the subfolder is essentially the name of the 'BaseSprites'

I then want to be able to quickly switch between the string (ie: the name), the int (ie: the index), and a the reference(ie: the specific 'BaseSprites' instance stored in BaseSpritesList).

If I wasn't doing this runtime, then I would create an enum "BaseType" and make BaseSpritesList a Dictionary.

  • 2
    You might wanna try a similar implementation for two way int-string here: http://stackoverflow.com/questions/10966331/two-way-bidirectional-dictionary-in-c – Joel Legaspi Enriquez Jul 29 '15 at 04:52

1 Answers1

0

I already solved the problem. I created my own class. It contains a list of strings (names) and a list of objects of any type. It has 6 get methods that can interchange between the string, int and object any way.