I have a list containing data with string and number. I have to order it in ascending and descending order.
id data
------------------
1 data1@%
2 data10
3 data
4 @$data
5 data2
I fetch the record and store it in list "List". Then I order it in ascending, but "data10" is coming in b/w "data1" and "data2". Below is my code
var o/p = List.OrderBy(x => x.data);
expected output — standard ascending order format.