Saturday, 13 October 2012

c sharp programming

how to use linq



using System;
using System.Linq;
 
string[] greetings = {"hello world", "hello LINQ", "hello Apress"};

var items = 
  from s in greetings
  where s.EndsWith("LINQ")
  select s;

foreach (var item in items)
  Console.WriteLine(item);

No comments:

Post a Comment