Dynamic in C#

Discussion created by cescamilla on Jan 15, 2009
Latest reply on May 12, 2010 by cescamilla

I was reading the Microsoft blog and found some interesting articles about the new keyword dynamic in C#, it's a series of 5+ posts that expose one of the new functionality in The C# language reference version 4.0.


In sum, the C# compiler now supports late binding so there is no need to make a cast at compile time, it can be done by the CLI in runtime, and a method can be called if it exists, if it does not exist after the cast has been made it will fail at runtime. So, you can have a object and call it's ToString() method without knowing the object time at compile time. (this could be used easily to call tostring or value in a pipoint even if it is a DigitalState or a Float or anyother type)


Here is the link for the first post about this.