like condition in generic lists -
im wondering there condition instead of t-sql in generic list in c# 4.0,
ive got gridview on page got datas , need search name , lastname, think there must couldnt find yet...
use string.contains, string.startswith or string.endswith part of predicate, either using list<t>.findall or where in linq.
for example:
var jons = people.where(p => p.firstname.startswith("jon", stringcomparison.currentcultureignorecase)) .tolist();
Comments
Post a Comment