Posted By: Jason Olson | Mar 11th @ 10:04 AM | 64,252 Views | 25 Comments
In this episode of 10-4, we take a look at some features coming with C# 4.0 that will help you simplify your existing code (as well as making new code you write more simple). There's already a plethora of C# 4.0 content you can find out there (including here on Channel 9 itself), so we will dive in specifically to how the combination of named and optional parameters will help you simplify your code.

While we aren't specifically using the CTP, most (if not all) of the code shown in this video should work in the CTP as well.

For more 10-4 episodes, be sure to visit:
http://channel9.msdn.com/shows/10-4

C# Dev Center:
http://msdn.microsoft.com/en-us/vcsharp/default.aspx

Community Convergence Blog:
http://blogs.msdn.com/charlie/default.aspx

Managed World Blog:
http://www.managed-world.com/

Visual Studio Topic Area on Channel 9:
http://channel9.msdn.com/VisualStudio

10-4! Over and out!

Rating:
1
0
Moemeka
Moemeka
Me
Man,
  you guys are making my expensive college education in Computer Science even more useless.  Why did I need to learn about method overload again?  Quick question.  Does the default value of the default parameter you specify get exposed through intellisense to the comsumer of the method?
vesuvius
vesuvius
Das Glasperlenspiel
Hello Jay,

I cannot see the code when I play it in the Silverlight player, I thought the new VS designer had a vector based code editor? Hope the download is clear!
vesuvius
vesuvius
Das Glasperlenspiel
Wait until you have to maintain code writte by somebody else, you will find that the concepts your learnt were well worth it. Its fine for code written in 2010, but there is a lot of code writtem before now, that even colllege graduates in 10 years time will have to maintain. 

Cutting corners in Computer Science doesn't not really exist, unless you only ever work on code written from a specific date.
aL_
aL_
Rx ftw
one thing that bugs me is that the default values for a method are moved to the call site at compile time.. in other words, if you have a default value for an argument, that argument wont change in old code even if you change it in your method after the old code is compiled. old code will still use the old default value..

this is just a detail though Smiley default values are still awsome. but its something to keep in mind Smiley
SlackmasterK
SlackmasterK
I write my OWN blogging engines
Wow, this video is so clear I thought I could click the Visual Studio 'Close' button.
claudy27
claudy27
claudy27
same here...lol
Microsoft Communities