Hi Ian, Declaring a variable As Object in VB, versus declaring it as dynamic in C# really isn't that different. You should try the code you have in C#, and try it in VB. There's no significant change for VB in regards to dynamic binding from .NET 4.0 to 4.5.
In regards to JSON, I was discussing this just the other week in regards to VB's XML literals. A .ToJSON extension would be pretty cool. |-----Original Message----- |From: [email protected] [mailto:ozdotnet- |[email protected]] On Behalf Of Ian Thomas |Sent: Wednesday, 5 October 2011 2:50 PM |To: 'ozDotNet' |Subject: RE: Dynamic | |Bill | |Ha Ha - Yes, I *have* used late binding in VB - 'for ever' (VBA, Access Basic, VB6), |and also declaration as Object with VB in the .NET Framework up to 3.5 | |But, the C# 4.0 seems very terse and simple - so it attracted me, instead of my |clumsy use of declaration as Object to parse the JSON stuff I was dealing with. | |But that may be my sloppy coding! | |So, if the syntactic sugar for VB.NET in the 4.5 Framework is similar to that in C# |4.0, I will appreciate it, I think :) | |(Yet to try the v4.5 CTP) |________________________________ |Ian Thomas |Victoria Park, Western Australia | |-----Original Message----- |From: [email protected] [mailto:ozdotnet- |[email protected]] |On Behalf Of Bill McCarthy |Sent: Wednesday, October 05, 2011 11:24 AM |To: 'ozDotNet' |Subject: RE: Dynamic | |Just curious ... Have you actually used any late binding or dynamic dispatch at all |in the last decade prior to C# 4 ??? | |Prior to C# 4, you had to use on of the scripting languages or VB.NET. The |dynamic language runtime helped static languages to some extent, but lacked |that integrated approach. With .NET 4, some of the DLR got integrated into the |framework (eg System.Core.Dynamic) and both VB and C# support |DynamicObject as well as the traditional late binding. |And yes, it is as it has been for the last decade, just declare the variable As Object |and turn Strict Off | |Oh, and yes VB has optional parameters too ;) | | | ||-----Original Message----- ||From: [email protected] [mailto:ozdotnet- ||[email protected]] On Behalf Of Ian Thomas ||Sent: Tuesday, 4 October 2011 1:27 PM ||To: 'ozDotNet' ||Subject: RE: Dynamic || ||> VB has had a "sort-of" dynamic (via Options), but can this be done ||> in |VB.NET ||for Framework 3.5 or 4.0 ? I don't think so - || ||Well, I guess using object and Option Strict OFF it can be done - I ||will |have a try ||sometime. || || || ||________________________________ || ||Ian Thomas ||Victoria Park, Western Australia |
