With the introduction of Visual Studio 2010, there are lots of refinements in its main supported programming languages like C# and VB. Here we list some of them from both languages:
C# 4
1. Dynamic lookup: A new type has been introduced called dynamic. The idea is that you can call any operation on the dynamic type you want, and the compiler won’t check it at compile-time but figure it out at runtime. A dynamic object is assumed to support any operation at compile-time, and only at runtime will you get an error. The result of any dynamic operation is of type dynamic.
// Instantiation
dynamic intCount = 7; // implicit conversion
dynamic intCount = GetObject();// Operations on dynamic types
intCount .fldField = intCount .propProperty; // getting and settings fields and properties
intCount[“one”