What is the most efficient way to create a constant (never changes at runtime) mapping of strings to ints?
string
int
I\'ve tried us
Why not:
public class MyClass { private Dictionary _myCollection = new Dictionary() { { "A", 1 }, { "B", 2 }, { "C", 3 } }; public IEnumerable> MyCollection { get { return _myCollection.AsEnumerable>(); } } }