Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Insert Item In Dictionary
Message
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Miscellaneous
Thread ID:
01462835
Message ID:
01462840
Views:
58
>I need to insert an item into a Dictionary at a specific position. Each item in the dictionary object has an Order value that specifies the position the item should be in in the collection.
>
>Anyone know how to do this?

SortedDictionary?
SortedDictionary<int, string> sd = new SortedDictionary<int, string>();
            sd.Add(3, "Third");
            sd.Add(1,"First");

                foreach (string s in sd.Values)
                {
                    string a = s;
                }
Previous
Reply
Map
View

Click here to load this message in the networking platform