有时可能需要需要获取一个List中符合某条件的项的index集合,可以使用如下Linq语句: var query = source.Select((value, index) => new { value, index }).Where(x => x.value => Condition(value)).Select(x => x.index); 相关文章: 2022-12-23 2022-12-23 2022-12-23 2022-12-23 2022-01-24 2021-10-11 2021-12-21 2021-09-28