Creating an array of pairs of strings and ints

I have a series of unlockable items in my game, each with its own number and a name. I’ve got an array of bools that determines if each item has been unlocked. Remembering which unlockable corresponds to each position in the array can be annoying, and sometimes I have to convert between the name and the number. Is there a type I can use where I can store the pairs of strings and ints, and return the int if I give it the string or return the string if I give it the int (kind of like a dictionary, but where the string and the int are both keys that must be searchable)? Or maybe there’s a better way of storing this information altogether?

Create a class with a Indexer which use a string and the other one which use a int.

Yes, you can do this by creating a custom key for a dictionary. The custom key would be a class defining the unlockable item number (let’s say that’s an integer) and the name as a string. This link will discuss how to create the custom key.

I’m an idiot. I just needed to use an array of strings to store the corresponding unlockable names.