So here my requirement: I want a data structure that has a list of strings and an integer value associated with each string. After initialization of this data structure I would like to be able to edit the integer values, but disallow the addition of more strings.
So immediately I thought that of using Dictionary<string, int>
, but this doesn't satisfy my desired requirements as more keys can be added after initialization. Secondly, I thought of Hashtable
, but that doesn't help me at all as the IsFixedSize
variable is readonly
.
Is there already a data structure that accomplishes this within the .NET Framework or should I just write my own?
Thanks for any and all help.