Jump to content

Recommended Posts

Posted

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 :)

  • Upvote 1
Posted

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?

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...