|
by Paulo Morgado via Paulo Morgado : C# on 3/19/2010 2:34:00 AM
C# 4.0 introduces a new type: dynamic. dynamic is a static type that bypasses static type checking.
This new type comes in very handy to work with:
The new languages from the dynamic language runtime.
HTML Document Object Model (DOM).
COM objects.
Duck typing
…
Because static type checking is bypassed, this:
dynamic dynamicValue = GetValue();
dynamicValue.Method();
is equivalent to this:
object objectValue = GetValue();
objectValue
.GetType()
.InvokeMember(
... [ read more ]
|