Integrated Query Language Comes To .NET

In the next version of .NET (not 2005), we will finally get an intergrated query language. What does that mean? Well you will be able to apply querys like you do to Databases to any IEnumerable object like arrays, objects etc. Even XML! Here is an example of an array query:

using System;

using System.Query;

using System.Collections.Generic;

class app {

static void Main() {

string[] names = { “Burke”, “Connor”, “Frank”,

“Everett”, “Albert”, “George”,

“Harris”, “David” };

IEnumerable<string> expr = from s in names

where s.Length == 5

orderby s

select s.ToUpper();

foreach (string item in expr)

Console.WriteLine(item);

}

}

Way cool! You can even use this in Visual Basic.NET 2005 now. For more information go to: http://go.microsoft.com/fwlink/?LinkId=51461

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: