Thursday, June 05, 2008

C# 3.0 Specifications.

C# 3.0 ("C# Orcas") introduces several language extensions that build on C# 2.0 to support the creation and use of higher order, functional style class libraries. The extensions enable construction of compositional APIs that have equal expressive power of query languages in domains such as relational databases and XML. The extensions include:
· Implicitly typed local variables, which permit the type of local variables to be inferred from the expressions used to initialize them.
· Extension methods, which make it possible to extend existing types and constructed types with additional methods.
· Lambda expressions, an evolution of anonymous methods that provides improved type inference and conversions to both delegate types and expression trees.
· Object initializers, which ease construction and initialization of objects.
· Anonymous types, which are tuple types automatically inferred and created from object initializers.
· Implicitly typed arrays, a form of array creation and initialization that infers the element type of the array from an array initializer.
· Query expressions, which provide a language integrated syntax for queries that is similar to relational and hierarchical query languages such as SQL and XQuery.
· Expression trees, which permit lambda expressions to be represented as data (expression trees) instead of as code (delegates).

I reckon it should be a must read for all C# programmer(especially for those who are planning to use LINQ, cause features like Extension Method, Anonymous Type, Lamda Expression are built for LINQ, these features work as an infrastructure for LINQ )

Btw. It is just 25 pages document, so won’t be taking much time to finish it, enjoy reading .. -:)
You can find the document at http://msdn.microsoft.com/en-us/library/ms364047(VS.80).aspx#cs3spec_topic4

No comments: