Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Insert Item In Dictionary
Message
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Divers
Thread ID:
01462835
Message ID:
01462840
Vues:
57
>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;
                }
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform