LINQ OrderBy 按指定顺序排序

list = list .OrderBy(a =>  Array.IndexOf(new int[] { 2, 1, 3 }, a.Status)).ToList();

 

posted @ 2021-12-27 18:11  Allen_666  阅读(451)  评论(0)    收藏  举报