I think this says it all = Duck Typing, Tuple, Open Class, method_missing ..
class C { public dynamic myField; public dynamic MyProp { get; set; } public dynamic MyMethod(dynamic d) { return d.Foo(); } public delegate dynamic MyDelegate(dynamic d); } and this IDynamicObject interface public class MyDynamicObject : IDynamicObject { public MetaObject GetMetaObject(Expression parameter) { return new MyMetaObject(parameter); } } and meta object overrides public class MyMetaObject : MetaObject { public MyMetaObject(Expression parameter) : base(parameter, Restrictions.Empty) { } public override MetaObject Call(CallAction action, MetaObject[] args) { Console.WriteLine("Call of method {0}", action.Name); return this; } public override MetaObject SetMember(SetMemberAction action, MetaObject[] args) { Console.WriteLine("SetMember of property {0}", action.Name); return this; } public override MetaObject GetMember(GetMemberAction action, MetaObject[] args) { Console.WriteLine("GetMember of property {0}", action.Name); return this; } } https://blogs.msdn.com/cburrows/archive/2008/10/28/c-dynamic-part-ii.aspx On Tue, Oct 28, 2008 at 10:14 PM, Dody Gunawinata <[EMAIL PROTECTED]>wrote: > Hmm..is there any hosted VPC made available? I'm based in Cairo and a 23GB > download will probably tie up the whole bandwidth of Africa. > Dody G. > > > On Tue, Oct 28, 2008 at 6:58 AM, Curt Hagenlocher <[EMAIL PROTECTED]>wrote: > >> Watch the the videos from the PDC, once they're posted. I know that some >> of your questions about use of DynamicObject from within C# are answered by >> Jim Hugunin's talk. Also, if you can download the 23 GB(!) VPC image with >> the Visual Studio 2010 CTP, you'll be able to try the walkthroughs -- and I >> think that one specifically addresses the XML scenario. >> >> >> On Mon, Oct 27, 2008 at 9:32 PM, Dody Gunawinata <[EMAIL PROTECTED] >> > wrote: >> >>> I'd call it missed opportunity if what C# 4.0 dynamic does is only to >>> provide the same facilities that VB6 or VB.Net have provided long time ago. >>> For example, the COM interop thing is nice, but then for the past 8 years >>> you know that if you want to script some Office or COM objects you don't use >>> C# or IronPython or (insert dynamic language). >>> But it looks like there are more here. DynamicObject type and >>> IDynamicObject looks intriguing and I wonder it finally allows more natural >>> XML or ActiveRecord object access via property call >>> like myDocument.Customer.Name.FirstName without resorting to some static >>> code generation. I also wonder if this also allows C# to simulate open >>> classes just by putting a hashtable of object and stuff delegate, data, >>> property into them . >>> >>> >>> Dody G. >>> >>> On Tue, Oct 28, 2008 at 1:52 AM, Tim Roberts <[EMAIL PROTECTED]> wrote: >>> >>>> On Tue, 28 Oct 2008 00:36:05 +0200, "Dody Gunawinata" >>>> <[EMAIL PROTECTED]> wrote: >>>> > Yup. It looks like more information needed on all of these dynamic >>>> features. >>>> > In the first glance it looks like C# 4.0 is turning into VB 6 :) >>>> > >>>> >>>> Are you saying that would be a bad thing? Let us recall that VB6 was >>>> arguably the most successful release in Visual Basic history. There are >>>> still people who won't allow themselves to be dragged away from VB6, >>>> more than a decade after its release. >>>> >>>> -- >>>> Tim Roberts, [EMAIL PROTECTED] >>>> Providenza & Boekelheide, Inc. >>>> >>>> _______________________________________________ >>>> Users mailing list >>>> Users@lists.ironpython.com >>>> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com >>>> >>> >>> >>> >>> -- >>> nomadlife.org >>> >>> >>> _______________________________________________ >>> Users mailing list >>> Users@lists.ironpython.com >>> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com >>> >>> >> > > > -- > nomadlife.org > > -- nomadlife.org
_______________________________________________ Users mailing list Users@lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com