What is the most efficient way to create a constant (never changes at runtime) mapping of string
s to int
s?
I\'ve tried us
I am not sure why no one mentioned this but in C# for things that I cannot assign const, I use static read-only properties.
Example:
public static readonly Dictionary NewDictionary = new Dictionary()
{
{ "Reference1", Array1 },
{ "Reference2", Array2 },
{ "Reference3", Array3 },
{ "Reference4", Array4 },
{ "Reference5", Array5 }
};