In my generic list contain integer and string value. how do i perform OrderBy or OrderByDescending.
For example
List<String> codelst = new List<string>() { "1","2","3","4","5","10","100","a12","b12" };
codelst.OrderBy(g => g);
It shows like as follows
1
10
100
2
3
5
a12
b12
but need to show
1
2
3
5
10
100
a12
b12
if I have convert to int it shows input string error
codelst.OrderBy(g => Convert.ToInt32(g));
How to achieve this