Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Fastest way to sort a collection
Message
De
31/01/2013 11:51:02
 
 
À
31/01/2013 11:40:36
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01564757
Message ID:
01564849
Vues:
34
>The List class (http://msdn.microsoft.com/en-us/library/6sh2ey19%28v=vs.90%29.aspx) also supports an indeterminate number of items. Given your usage, you may also want to consider using a Dictionary (http://msdn.microsoft.com/en-us/library/xfhwa508%28v=vs.90%29.aspx) as it will provide O(1) access to your data by the field. A dictionary will only work if your field is unique though.

Yes, I have a dictionary in my framework for storing in memory my entire data dictionary. But, I would prefer to remain with a collection. In the other message, I received an approach to sort it out. For now, I have dumped into an array and read the array in reverse order. But, with the suggestion mentioned in the other message, I think this will be greatly simplified.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform