I have the following list with 3 columns. Column 3 is of type string, when trying to identify if it is an integer
Col1 Col2 Col3
0000 Item0 1
0000 Item0 10
0000 Item0 11
0000 Item0 12
0000 Item0 2
0000 Item0 3
0000 Item1 P1
0000 Item1 P10
0000 Item1 P11
0000 Item1 P12
0000 Item1 P2
0000 Item1 P3
when i try to sort it as follows, the last column is not sorted by field type
var orderedCustomers = Object.OrderBy(c => c.Col1).ThenBy(c => c.Col2).ThenBy(d => d.Col3);
Has anyone been through something similar, I want column 3 to be sorted asc but first numerically?
the result I am looking for is:
Col1 Col2 Col3
0000 Item0 1
0000 Item0 2
0000 Item0 3
0000 Item0 10
0000 Item0 11
0000 Item0 12
0000 Item1 P1
0000 Item1 P2
0000 Item1 P3
0000 Item1 P10
0000 Item1 P11
0000 Item1 P12