If you find this article useful, consider making a small donation to show your support for this web site and its content.
DiscountASP
AboutMe
About me:
Hi. My name is Farooq Kaiser and I'm a software developer from Toronto, Canada.

Using Where<T> with Lambda Expressions

by Farooq Kaiser 9. February 2009 03:31

The Where<T> extension method can be used where you would use 

conditional logic to filter the elements. 

var w = new string[]{"Microsoft", "Google", "Yahoo", "Amazon"};      

IEnumerable<string> p =  w.Where(s => s.Contains('A') && s.Contains('o'));    

 foreach(string s in p)  Console.WriteLine(s);

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: ,

.NET | C#

Jobs Autos Real estate Videos Power by Google
awesome comments