I have a class that contains a lot of fields. I want to order the list of items of my class by one property, then by the other and so on... I need to do that using SortExpression and SortDirection.
How can I do this in vb?
Dim LsDocuments As List (Of clsDoc) = GetDocuments()
clsDoc
is a class with properties:
Date
Hour
Key
Office
I need something like: LsDocuments.orderby("Date","Asc")
, and not like LsDocuments.orderby(Functuion(x) x.Date)
because it's not general- every time I need to sort by other property (and doing Select case is very not classic).