Possible Duplicate:
Creating a constant Dictionary in C#
I currently have:
public string GetRefStat(int pk) {
return RefStat[pk];
}
private readonly Dictionary<int, int> RefStat =
new Dictionary<int, int>
{
{1,2},
{2,3},
{3,5}
};
This works but the only time I use the RefStat dictionary is when it is called by GetRefStat.
Is there a way I can combine the method and the dictionary?