Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Fastest way to sort a collection
Message
De
31/01/2013 12:36:37
 
 
À
31/01/2013 12:09:30
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:
01564865
Vues:
34
J'aime (1)
I'm not fluent in VB, but my best guess at the VB equivalent is:
Dim result = oParametersDataDictionaryField.OfType(Of Object())().OrderByDescending(Function(x) x[0])
Result should be an IEnumerable of Object arrays. You can add ToArray() or ToList() to the end if you want an array or list respectively.

As for using one of the generic collections over the VB collection, Microsoft does recommend that (http://msdn.microsoft.com/en-us/library/microsoft.visualbasic.collection.aspx, see the note under remarks). Both the VB collection and the generic List implement the IList and ICollection interfaces, so chances are most of what you are doing should be equivalent. Just create your List as List(Of Object()).
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform