Categories
Development

Most efficient way of storing objects with corresponding indices

I want to store a collection of Points, which are objects of the class Point. (Point contains properties as positionX, positionY, electricalPotential, etc.) Each of them should have an index i, but the don’t need to be ordered in any way. This is why I used a dictionary Dictionary<int, Point> meshpoints in the first place. […]