I need to save 2 values in one list so I have all the positions AND my controls of my board in one list.
I was using a Dictionary but I found out that there is only one way mapping.
Does anyone have any recommendations except a 2-dimensional Array?
I need to save 2 values in one list so I have all the
Share
You can use a dictionary easily enough as a two-way mapping if you don’t care about linear search performance for the reverse mapping (which you’d get with a 2D array anyway):
If the lookup speed is an issue than you’ll have to maintain two dictionaries – one for the forward lookup and one for the reverse. Or use an in-memory, indexable database such as SQLite.