Geeks With Blogs
Stefan Barrett blog

Back home after a conference which flew by.

The main bits I'm going to be playing with, will be the .NET 4.0 - I wonder how long it will be before we can get our hands on it.

One of the main selling points for me, was the new dynamic keyword, which a number of presenters got a laugh from describing as "... statically declaring as dynamic". This will make talking to office (from C#) a lot easier but the potential for abuse is quite high. Basically it allows you to write something like:

dynamic something = someObject.someChildObject;
something.Func();

Where the someChildObject property on someObject actually returns a object. At run time, and not compile time, Func gets resolved.

This would allow somebody to write something like:

dynamic func(dynamic a, dynamic b)
{
        return a.Func(b);
}

You can pass anything into this function, as long as 'a' has a function which takes 'b' and returns something.

 

Posted on Monday, November 3, 2008 11:27 AM PDC08 | Back to top


Comments on this post: PDC [ It went so fast

Comments are closed.
Comments have been closed on this topic.
Copyright © Stefan Barrett | Powered by: GeeksWithBlogs.net