var newFaceInfoList = faceTopInfoList.OrderByDescending(o => o.finalValue).ToList();//降序 (更新排行榜的infoList的排序)
var quChongList= faceTopInfoList.Where((x, i) => faceTopInfoList.FindIndex(z => z.id == x.id) == i).ToList();//Lambda表达式去重 通过face.id去重
根据对象属性值 获取索引(未测试)
List<Person> people = new List<Person> { new Person { Name = "Alice", Age = 30 }, new Person { Name = "Bob", Age = 25 }, new Person { Name = "Charlie", Age = 35 } }; int index = people.FindIndex(p => p.Name == "Bob"); 标签:Name,C#,Age,List,Person,new,操作,id From: https://www.cnblogs.com/lingLuoChengMi/p/18097098