Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How To Sort This
Message
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Divers
Thread ID:
01471946
Message ID:
01471985
Vues:
41
>>I have a Project object. On it is a property called QueryItems. QueryItems is a List containing this class:
>>
>
>>How do I do this?
>
>Something like this should work. You'll have to adjust it for your own code:
>
>
>List<csQueryItem> project = new List<csQueryItem>();
>
>project.Add(new csQueryItem("C7497A"));
>project.Add(new csQueryItem("A7025A"));
>project.Add(new csQueryItem("A6913A"));
>project.Add(new csQueryItem("A9918A"));
>
>var sortedProject = project.OrderBy(i => i.QueryString);
>
If Kevin wants Products first then it would probably need to be:
var sortedProject = project.OrderBy(i => !i.IsProduct).ThenBy(i => i.QueryString);
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform