Q:

Storing a reference integer and it's value

I want to store a variable length list which will contain a reference integer id which will be taken from a database so there could be many or few and with each of them I want an integer ranking number. So for instance I will have a reference integer 14 with a rating/ranking of 58. How would I go about doing this?

A:

Since each integer can, I assume, only occur once, a Dictionary<int, int> sounds like the best solution.
var rankings = new Dictionary<int, int>();
int someInt = GetIntFromDB();
int someRanking = GetRankingForInt(someInt);

rankings[someInt] = someRanking;

