C# 4.0

After watching the Anders Hejlsberg’s session “The Future of C#” on Channel 9, I’ve got excited to get hands on the upcoming features of C#. Since the inception of C#, each version bought some major changes and amendments in the language. Like, In C# 1.0 the major theme was Managed Code then in C# 2.0, Generics were introduced and lastly in C# 3.0 LINQ was introduced. C# 4.0 introduced the concept of Dynamic Programming in C#. Overall there are four main features that are introduced in upcoming C# 4.0:

  1. Dynamic Typed Objects
  2. Optional and Named Parameters
  3. Improved COM Interoperability
  4. Co- and Contra-Variance

We will explore these features one by one in the upcoming posts. A document related to New Features in C# is available at MSDN that explain all of the above features in a little detail. Plus if you are interested in getting an early look on Visual Studio 2010 CTP, you can follow my post on Visual Studio 2010 CTP.

Have a good time!

  • I believe parallel programming (with the tasks library and chess) and test driven development (with the code contracts and pex) are also some of the main features for C#4

    Daniel Moth would be mad at you for not mentioning him! 😛