Generic Dictionary C#
Posted
by pm_2
on Stack Overflow
See other posts from Stack Overflow
or by pm_2
Published on 2010-03-31T12:45:36Z
Indexed on
2010/03/31
12:53 UTC
Read the original article
Hit count: 298
I have a class that inherits from a generic dictionary as follows:
Class myClass : System.Collections.Generic.Dictionary<int, Object>
I have added a list of values to this in a particular order, but I now wish to change that order. Is there any way (without removing and re-adding) that I could effectively re-index the values; so change the object at index 1 to now be at index 10 for example? For example, this doesn't work:
myClass[1].Index = 10;
© Stack Overflow or respective owner