I have a list (i.e. Dim nList as new List(of className)). Each class has a property named zIndex (i.e. className.zIndex). Is it possible to sort the elements of the list by the zIndex variable in all of the elements of the list?
I have a list (i.e. Dim nList as new List(of className) ). Each class
Share
Assuming you have LINQ at your disposal:
Or if LINQ isn’t your thing:
LINQ offers more flexibility; such as being able to use
ThenByif you want to order by more than one thing. It also makes for a slightly cleaner syntax.