Here is a simple example taken from http://msdn2.microsoft.com/en-us/library/aa479865.aspx
using System;
using System.Query;
using System.Collections.Generic;
class app {
static void Main() {
string[] names = { "Burke", "Connor", "Frank",
"Everett", "Albert",
"George", "Harris",
"David" };
IEnumerableexpr = from s in names
where s.Length == 5
orderby s
select s.ToUpper();
foreach (string item in expr)
Console.WriteLine(item);
}
}
Many more examples are available here: http://msdn2.microsoft.com/en-us/vcsharp/aa336746.aspx
No comments:
Post a Comment