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

Popular posts from this blog

java - SNMP4J General Variable Binding Error -

windows - Python Service Installation - "Could not find PythonClass entry" -

Determine if a XmlNode is empty or null in C#? -