I need to Sort
a List
in c# that has data like
{"301","301b","301a","300",302}
Expected output
{"300","301","301a","301b",302}
I need to Sort
a List
in c# that has data like
{"301","301b","301a","300",302}
Expected output
{"300","301","301a","301b",302}
Below one is your expected answer to make list in order.
List<string> abc=new List<string>() {"301","301b","301a","300","302"};
Console.WriteLine("Hello World {0}",string.Join("|",abc.OrderBy(x=>x).ToList()));