Remember my post about ".Net Interop: using Arrays and Collections" (not too long ago)? Well, almost immediately i got a comment from Freddy (Kristiansen) explaining that the Dictionary that I used, is actually quite an expensive one.. . It actually uses two collections (one for the key to find the Index, second for the value with that index), which causes for overhead in case you don't actually need it for your software. When using arrays for lots of data, you might want to consider to use Lists or ArrayLists instead.. .
In both cases, the code looks alike .. . Something like this for Lists:
And this for ArrayLists:
Quite identical, isn't it?
The big difference when using these in stead of using a dictionary is the fact that you're using a real index as key (and not a definable index as in a dictionary).
But what is the difference between a List and an ArrayList?
I'm actually not sure it makes big of a difference for AL developers like us. In C#, this would be the explanation:
I hope this is sufficient for an explanation. If you have something to contribute .. please feel free to drop a comment!