L B Posted March 30, 2010 Share Posted March 30, 2010 Just thought I'd share the link: New Features in C# 4.0 Including optional parameters (will be useful for the C#LE wrapper): public void Initialize(int width = 800, int height = 600, int depth = 32, int hertz = 60, int flags = (int)BufferType.Color) { ... } Named parameters (useful for users) Graphics.Initialize(1024, 768, hertz : 75); Dynamic objects, with calls and methods calculated at runtime: dynamic test = GetDynamicObject(...); test.NotDefined(2); Will work even though the type of "test" is not determined. A Runtime Exception will be thrown if the method does not exist. Looking forward to this new version 1 Quote Link to comment Share on other sites More sharing options...
ZioRed Posted March 31, 2010 Share Posted March 31, 2010 NET 4.0 rulez, it's a perfect enhancement to 3.5 where I really loved LINQ features for tens of code lines it saves to us (i.e. no more annoying foreach cycles to select items from collections). Quote ?? FRANCESCO CROCETTI ?? http://skaredcreations.com Link to comment Share on other sites More sharing options...
Rick Posted March 31, 2010 Share Posted March 31, 2010 It's kind of funny how the C# people generally think the VB.NET people are newbs (just in general not in this thread), but the first 2 features are something that VB.NET has had since it was created. It took 4 versions before C# got those. What is wrong with MS. And dynamic objects is basically late binding, which I thought was already there? Quote Link to comment Share on other sites More sharing options...
Rekindled Phoenix Posted April 3, 2010 Share Posted April 3, 2010 Rick couldn't have said what I was going to type any better. I'm glad the newest C# users will be able to use these enhancements. Took MS long enough. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.