像Lambda表达式和LINQ [英] Like in Lambda Expression and LINQ
本文介绍了像Lambda表达式和LINQ的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
简单的问题,怎么能有这样的事情。
customers.where(C => c.Name **如* * 约翰);
我知道这ISN不可能的,但我不知道我怎么能有类似的东西。
先谢谢了。
解决方案
客户。凡(C => c.Name.Contains(约翰));
Simple Question how to have something like this
customers.where(c=>c.Name **like** "john");
i know this isn not possible but i was wondering how can i have something similar.
thanks in advance.
解决方案
customers.Where(c => c.Name.Contains("john"));
这篇关于像Lambda表达式和LINQ的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文