I have a list of items and i am using the below code to sort this list of items
List<ModelItems> sorted_items = originalItems.OrderBy(i => i.Page).ToList();
where Page is a property that can be either an integer number or a string , so i set it as of type String and is not a required property in the model also. So it can be empty as well.
But while sorting , since its a string now it gives items in this order for example 1,17,3,37,5,"","s" etc
Can we sort the List using Linq in an integer way ?
Like the result should be numbers first, then strings like 1,3,5,17,37,"b","g","",.....