Using DynamicObject and ExpandoObject
C# is primarily
a statically typed language. That means the compiler needs to know in
advance about the data type of a variable. In the absence of this
information, the compiler will throw a compilation error and will refuse
to compile the code. In spite of the advantages offered by the
statically typed languages, dynamic languages have their own place in
application development. For example, most of the web sites developed
today make use of JavaScript in some way or the other. Languages such as
Python and Ruby are also popular amongst developers. The C# language
now supports dynamic features through Dynamic Language Runtime (DLR).
Part of these features include dynamic types, DynamicObject Class and
ExpandoObject Class. This article explains these features and provides
examples illustrating how these features are used.
http://www.bipinjoshi.net/articles/b181e4f3-5aa0-454f-b146-857ab7b06e69.aspx