As you know till now in c# everything was static and known at design time. But with the C# 4.0 language Microsoft have enabled new dynamic data type which is belongs to Dynamic Language Runtime on top of CLR(Common language Runtime). As you know that dynamic object will know their behaviour at run time. Here Microsoft has given one new class called ExpandoObject class. ExpandoObject class is a member of System.Dynamic namespace and is defined in the System.Core assembly. This class object members can be dynamically added and removed at runtime. This is class is a sealed class and implements number of interfaces like below.
public sealed class ExpandoObject :
Now let's take a simple example of console application. Where we will create a object of expandoobject class and manipulate that class at run time. Let's create a simple code like below.
static void Main(string args)
dynamic users = new System.Dynamic
View Complete Post