Lambda表达式作为函数参数

kas*_*rhj 6 c#

我有以下代码

List<int> GetIndices<T>(List<T> list, ?????? condition
{
    var result =
            list
                .Select((p, index) => index)
                .Where(condition);

    return result.ToList();
}
Run Code Online (Sandbox Code Playgroud)

我想称之为 GetIndices(someList, (p, index) => (someList[index].Height < someList[index - 1].Height))

什么是正确的类型condition

H.B*_*.B. 0

尝试Func<bool>

或者更确切地说是具有正确数量的输入参数的变体。