I'm not sure if this is the proper functionality for the Dictionary<>.Add . Here's the code:
Dictionary<int, string> dict = new Dictionary<int, string>(); dict.Add(1,"item1"); dict.Add(2, "item2"); dict.Add(3, "item3"); dict.Remove(1); dict.Add(4, "item4");
The dict.Add(4,"item4") adds the item to the beginning of the dictionary object, not the end(which i thought was the intended functionality. It seems that the Add inserts wherever the Remove index was within the Dictionary.
Is this correct If so, is there a way to always insert at the end of the Dictionary
Thanks
Paul
.NET Development4
|