Android Question Sort a List of Type with multiple criterias [SOLVED]

Armani

Member
Hello All,

I'm looking to sort a List of Type with multiple criterias.

As far as I understand, List.SortType(), is capable to sort only one criteria.

So, how to do such kind of multiple sort?

Example (expected behavior)
Type(Val1 as String, Val2 as String, Val3 as Int)

all type values are stored inside a List.

Sorting by:
Val1 Ascending and Val2 Ascending and Val3 Ascending

Initial:
C C 3
C B 2
B A 3
B A 1
A B 2
A C 3
A C 2

Sorted:
A B 2
A C 2
A C 3
B A 1
B A 3
C B 2
C C 3


Any help will be welcome.
Thanks in advance,
 
Last edited:
Top