I’m having two lists.
List A List B
a 10
b 5
c 20
I have to sort the List B ascending. Based on List B, List A also should reorder. So my result will be like this
List A List B
c 20
a 10
b 5
I’m using Linq here (orderby). Facing problem in sorting the other list. How can i do this?
One way would be
Edit: I’ve missed the Zip method. The line
could be written as