Instead of a
List
, I'd use a
Dictionary
:
Dictionary<string, int> enumerator = new Dictionary<string, int>();
enumerator.Add("enum1", 1);
There are many types of collections you can use. Your best bet is to google "
c# collections
" and pick the one that actually fits your requirements.