We have a generic List(Of Product) that must be sorted on two or more properties of the Product class.
The product class has the properties "Popular" numeric (asc), "Clicked" numeric (desc), "Name" string (asc). In order of naming the properties we want the list to sort.
How can it be sort with an lamba statement? If have found to sort the list based on one property.
EDIT Just realized this was a VB question. Here is the VB.Net solution
C# version. Try the following
I'm sorry but do you know any C#?
Can you get what you need from this?
To answer your question about a lambda expression, that is too complex to put in a lambda expression, as VB doesn't support multi-line lambda expressions.
For a non-LINQ solution:
You need a named method as a comparer:
Usage:
A compound sort can also be done with the List.Sort lambda function. Here is a vb.Net example: