New in framework 4 - dynamic object
Below the previous post on framework 4 ( Parallel ) - time will demonstrate the new type object - " dynamic ". Dynamic object is built at runtime . Unlike the previous version of the framework, when we received the object VAR - VAR built during Compilation , so that in fact we knew the type of object VAR in advance. Dynamic does not know it's like you until it actually materialize. Let's see an example Please note that varObject already during Compilation does not give us continue to work because of that string is not int. However, dynamicObject passes Compilation. Here is the correct code - passing Compilation: using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication1 { class Program { static void Main( string [] args) ...