开发者

LINQ using a function inside a Where clause?

开发者 https://www.devze.com 2023-03-30 17:13 出处:网络
I am trying to do this: myIEnumberable = myIEnumberable .Where(myFunc(moveInDate, r => r.GetPropertyAsDateTime(\"date\")) == true);

I am trying to do this:

myIEnumberable = myIEnumberable 
                .Where(myFunc(moveInDate, r => r.GetPropertyAsDateTime("date")) == true);

But getting the er开发者_如何学Goror:"cannot convert lamda expression to System.Date.Datetime because it is not a delegate type.

How do I go about writing this?

Thanks!


myIEnumberable = myIEnumberable
    .Where(r => myFunc(moveInDate, r.GetPropertyAsDateTime("date")) );
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号