3.6. Dynamic Enhancements

The new dynamic functionality in .NET 4.0 allows us to work with types not known at compile time in an intuitive and easy-to-read way. The dynamic changes allow you to do the following:

  • Write more readable code with fewer casting operations.

  • Create new languages to utilize the .NET Framework, such as IronPython and IronRuby. Additionally, .NET's dynamic architecture allows these languages to automatically benefit from future framework advances.

  • Utilize other dynamic languages and their libraries from C# and VB.NET.

  • Introduce customization/scripting and debugging/querying functionality within your applications.

  • Work with COM objects more easily. Microsoft Office COM is going to be around for some time whether you like it ...

Get Introducing .NET 4.0: with Visual Studio 2010 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.