Wednesday, June 8, 2011

C#: dynamic support in .NET 4

With C# 4.0, there is a new keyword: dynamic. This allows you to use an object without defining its type at compile time. It tells compiler – variable type is unknown until runtime. dynamic can be thought of as a special version of the type object that is “suspending belief

"dynamic is a static type that bypasses static type checking"

This allows you for example to call dynamic objects using the DLR (Dynamic Language Runtime).
Dynamic Objects could be one of following:
- a javascript method
- COM interop
- dynamic language (Ironpython, Ironruby) object
- HTML DOM in silverlight
- Object Implemetating IDynamicMetaObjectProvider

To understand dynamic in details, you can download my presentation from following link.

PPT DOWNLOAD LINK:
http://cid-61065223cd826e76.office.live.com/view.aspx/Public/Presentations/2.Dynamic.pptx


Comments/feedback are most welcome here.



1 comment: