Originally posted by mendhak
That sounds pretty good too, except for the amount of work to be put in, I guess.

My first guess was to create a class with three properties: FromCity, ToCity, Distance.

If you consider this for a moment, you are going to have to create an instance of the class for each possible combination - in the case of 6 cities that means 25 instances.

If you have a fixed number of cities, you class properties could be
FromCity, ToCity1, Distance1, ToCity2, Distance2 etc.

I think the array approach is better in this case.