Here's small snippet that gives glimpse of LINQ
var string[] s = { apple, boy, cat};
IEnumerable
where s.Length == 3
orderby s
select s.ToUpper();
Console.WriteLine("*****Simple QueryExpression using LINQ infrastructure in C#3.0");
foreach (string item in query)
Console.WriteLine(item);
here I would like to hint about new Implict typed local variables, new feature introduced in C# 3.0. Observant readers will find "var" keyword to be a implicit typed local variable. Implicit typed local variables will deduce the type from the initialized value.
For ex:
var x = 3 will result in treating x as integer based on value assigned to it.
Ok, let's try to understand above snippet..
All query expressions in LINQ begin with FROM clause.. there's much more into it.. Give me some time...as I'm learning bits and pieces of it
Listen to this beautiful video featuring Anders Hejlsberg, Chief Architect of C# giving good insights into LINQ and functional programming
http://blogs.msdn.com/charlie/archive/2007/01/26/anders-hejlsberg-on-linq-and-functional-programming.aspx