Thursday, June 08, 2006

C# 3.0 is Cool

I’ve already mentioned this article, but I decided to give it another thorough look, and I must say, C# 3.0 is really cool! The article is written by the infamous Don Box and it provides a comprehensive step-by-step tutorial on how each of the new C# 3.0 features can be used in practice, and eventually, how they are all meant to support the new query expressions. I already knew about LINQ, but until now, I wasn’t aware of its full potential. Many people have stated that it’s just an attempt by Microsoft to get a share in the ORM market. But in the same sense the foreach keyword is merely a shortcut for using the IEnumerable/IEnumerator interface, query expressions are really a SQL-like shortcut syntax for concatenating various query-like operations. You can perform query expressions on collections, databases (DLINQ), XML structures (XLINQ), and any other data source that conforms to the query expression pattern. Most of the new C# 3.0 features have been introduced to make this syntax compact and readable.