I have a collection of structures. Each structure has 2 keys. If I query using key #1, I should get key #2 in return and vice versa.
It's easy to write code on the desktop when you have the power of the .NET Framework behind you. I am writing code in the .NET Micro Framework, which is a very very limited subset of framework. For instance, as far as collections, I only have arrays and ArrayList objects at my disposal.
So for example here is the list of structures:
Key #1 Key #2
6 A
7 F
8 Z
9 B
So when I query for 8, I should get Z. When I query for Z, I should get 8.
I am looking to do the fastest and least processor intensive lookup using either arrays or ArrayList. The device I am coding against is a low-end ARM processor, thus I need to optimize early.