Understanding LINQ : LINQ « LINQ « ASP.NET Tutorial






var words = new List<string> {"zephyr", "apple", "azure"};


var results = from w in words
  where w.Contains("z")
  select w;


the results variable will contain the following list of two words:

zephyr
azure








17.7.LINQ
17.7.1.Understanding LINQ
17.7.2.The C# language supports the following clauses that you can use in a query: