I have a program that uses:
// the assignments of hardcoded ids and memoryIndex are for the sake of this question
int id1 = 1;
int id2 = 2;
int id3 = 3;
int id4 = 4;
int memoryIndex = 0;
int[][][] sequence;
sequence[id1][id2][id3] = memoryIndex;
I want to use something dynamic with a variable amount of keys defined at runtime, so I could also have 4 or more ids that belong to a sequence. I can't afford a lot of checks because speed is a greater concern than memory. How could I accomplish this in C#?