Orderby() not ordering numbers correctly c#

后端 未结 12 1723
渐次进展
渐次进展 2020-12-15 03:08

I am writing an app for my company and am currently working on the search functionality. When a user searches for an item, I want to display the highest version (which is st

12条回答
  •  遥遥无期
    2020-12-15 03:23

    try this:

    var items = results.(Select(v => v).OrderBy(v => v.PadLeft(4));
    

    that'll work in Linq2Sql

提交回复
热议问题