I have a list of passengers(object) where it has a differents properties..
passenger.name
passenger.age
passenger.surname
And I want to sor
you must implement IComparer interface.
In this sample I've my custom object JSONReturn, I implement my class like this :
Friend Class JSONReturnComparer
Implements IComparer(of JSONReturn)
Public Function Compare(x As JSONReturn, y As JSONReturn) As Integer Implements IComparer(Of JSONReturn).Compare
Return String.Compare(x.Name, y.Name)
End Function
End Class
I call my sort List method like this : alResult.Sort(new JSONReturnComparer())
Maybe it could help you