<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>New Features in C# 4.0 Paper, plus Feedback and Samples</title><link>http://blogs.msdn.com/charlie/archive/2008/11/04/new-features-in-c-4-0-paper-plus-feedback-and-samples.aspx</link><description>Mads Torgersen, a C# PM and member of the C# design team, has worked with other members of the C# team to create a document that outlines the new features in C# 4.0. Along with Anders’ PDC talk , this is probably the best way to get an overview of what</description><dc:language>en</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>New Features in C# 4.0 Paper, plus Feedback and Samples</title><link>http://blogs.msdn.com/charlie/archive/2008/11/04/new-features-in-c-4-0-paper-plus-feedback-and-samples.aspx#9042076</link><pubDate>Wed, 05 Nov 2008 02:31:33 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9042076</guid><dc:creator>DotNetKicks.com</dc:creator><description>&lt;p&gt;You've been kicked (a good thing) - Trackback from DotNetKicks.com&lt;/p&gt;
</description></item><item><title>re: New Features in C# 4.0 Paper, plus Feedback and Samples</title><link>http://blogs.msdn.com/charlie/archive/2008/11/04/new-features-in-c-4-0-paper-plus-feedback-and-samples.aspx#9043792</link><pubDate>Wed, 05 Nov 2008 12:39:25 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9043792</guid><dc:creator>Neil Stevens</dc:creator><description>&lt;p&gt;I know im going to start a huge debate here, but do we really need optional parameters in C#, one of the things i love the most about C# is how easy it is to read over the likes of VB and i refer specifically to optional parameters.&lt;/p&gt;
&lt;p&gt;I have always felt that optional parameters are ugly in written code and make it harder to read code and understand its intention, i have never liked the likes of&lt;/p&gt;
&lt;p&gt;M &amp;quot;Hello World&amp;quot;,,,&amp;quot;Hello&amp;quot;&lt;/p&gt;
&lt;p&gt;For someone picking up the code, they would have to ask what are the three commas for? what parameters do they represent?&lt;/p&gt;
&lt;p&gt;I think (IMHO) that overloading methods is far better than optional parameters and makes the code far more readable.&lt;/p&gt;
&lt;p&gt;If im the only one who thinks that then ill eat my words.&lt;/p&gt;
&lt;p&gt;Thanks for listening&lt;/p&gt;
&lt;p&gt;You've been a great audience...&lt;/p&gt;
</description></item><item><title>re: New Features in C# 4.0 Paper, plus Feedback and Samples</title><link>http://blogs.msdn.com/charlie/archive/2008/11/04/new-features-in-c-4-0-paper-plus-feedback-and-samples.aspx#9043815</link><pubDate>Wed, 05 Nov 2008 12:54:57 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9043815</guid><dc:creator>Ajit</dc:creator><description>&lt;p&gt;What is the difference between use of &amp;quot;dynamic&amp;quot; and &amp;quot;var&amp;quot; in C# 4.0&lt;/p&gt;
</description></item><item><title>re: New Features in C# 4.0 Paper, plus Feedback and Samples</title><link>http://blogs.msdn.com/charlie/archive/2008/11/04/new-features-in-c-4-0-paper-plus-feedback-and-samples.aspx#9043851</link><pubDate>Wed, 05 Nov 2008 13:29:56 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9043851</guid><dc:creator>Daniel Portella</dc:creator><description>&lt;p&gt;I would not worry to much about optional parameters, They will make some aspects of programming in csharp much easier. &lt;/p&gt;
&lt;p&gt;the difference var is unknown type you cant call members directly like you can in with dynamic types. &lt;/p&gt;
</description></item><item><title>re: New Features in C# 4.0 Paper, plus Feedback and Samples</title><link>http://blogs.msdn.com/charlie/archive/2008/11/04/new-features-in-c-4-0-paper-plus-feedback-and-samples.aspx#9043972</link><pubDate>Wed, 05 Nov 2008 14:43:15 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9043972</guid><dc:creator>Matt</dc:creator><description>&lt;p&gt;var - statically know (i.e. the csc compiler works out the type for you).&lt;/p&gt;
&lt;p&gt;If you decompile the result you would be unable to spot the difference between&lt;/p&gt;
&lt;p&gt;int i = 1;&lt;/p&gt;
&lt;p&gt;verses&lt;/p&gt;
&lt;p&gt;var i = 1;&lt;/p&gt;
&lt;p&gt;(it would look like the first one in both cases)&lt;/p&gt;
&lt;p&gt;dynamic - the compiler no longer knows what it is at compile time. Instead a variety of mechanisms occur at runtime to attempt to match the name of the method/property-or-field along with other know aspects like other parameters to the method* to an actual method/property/field.&lt;/p&gt;
&lt;p&gt;If you decompiled &lt;/p&gt;
&lt;p&gt;string s = &amp;quot;foo&amp;quot;;&lt;/p&gt;
&lt;p&gt;int i = s.Length;&lt;/p&gt;
&lt;p&gt;verses&lt;/p&gt;
&lt;p&gt;dynamic d = &amp;quot;foo&amp;quot;;&lt;/p&gt;
&lt;p&gt;int i = (int)d.Length;&lt;/p&gt;
&lt;p&gt;the differences would be massive (and the magic performed by the runtime would not be visible even then)&lt;/p&gt;
&lt;p&gt;Note also the cast from the dynamic result of the Length access to an int. It is possible that this is not required. The mechanisms that control the behaviour of implicit casts on dynamic is an area I have not yet looked at in detail (any anyhow this isn't finalized anyway)&lt;/p&gt;
&lt;p&gt;* This bit is highly complex when you get down to the nitty gritty though in practice many of the expected simple behaviours are just like the static compilers behaviour (an intentional design decision on the language designers point)&lt;/p&gt;
</description></item><item><title>re: New Features in C# 4.0 Paper, plus Feedback and Samples</title><link>http://blogs.msdn.com/charlie/archive/2008/11/04/new-features-in-c-4-0-paper-plus-feedback-and-samples.aspx#9044729</link><pubDate>Wed, 05 Nov 2008 19:57:48 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9044729</guid><dc:creator>Marc</dc:creator><description>&lt;p&gt;I agree with the first post. If you want a Visual Basic like language, then use Visual Basic. &lt;/p&gt;
&lt;p&gt;C# should retain it's purist ideals. Optional parameters look horid, and as far as I can make out have no use except for when programming with COM interfaces, and we have a workaround for that, System.Reflection.Missing.&lt;/p&gt;
&lt;p&gt;If the future of C# is becoming more like VB, &amp;nbsp;then I am dissapointed. VB is a mess of ByVal ByRef optonal this, end if, end this, end that that. Ouhgh!!&lt;/p&gt;
</description></item><item><title>re: New Features in C# 4.0 Paper, plus Feedback and Samples</title><link>http://blogs.msdn.com/charlie/archive/2008/11/04/new-features-in-c-4-0-paper-plus-feedback-and-samples.aspx#9047345</link><pubDate>Thu, 06 Nov 2008 09:58:52 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9047345</guid><dc:creator>Charlie Calvert</dc:creator><description>&lt;p&gt;Ajit,&lt;/p&gt;
&lt;p&gt;The simple explanation is that var is strongly typed and resolved at compile time, while dynamic is not strongly typed and it is resolved at run time. But that perhaps begs the question. I'm putting together a post that will explain this in more depth.&lt;/p&gt;
&lt;p&gt;For now, a great way to get started understanding Dynamic is to watch Anders' talk from PDC:&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://channel9.msdn.com/pdc2008/TL16/Default.aspx?wa=wsignin1.0"&gt;http://channel9.msdn.com/pdc2008/TL16/Default.aspx?wa=wsignin1.0&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;- Charlie&lt;/p&gt;
</description></item><item><title>re: New Features in C# 4.0 Paper, plus Feedback and Samples</title><link>http://blogs.msdn.com/charlie/archive/2008/11/04/new-features-in-c-4-0-paper-plus-feedback-and-samples.aspx#9048227</link><pubDate>Thu, 06 Nov 2008 13:27:03 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9048227</guid><dc:creator>zeltera</dc:creator><description>&lt;p&gt;I didn't finish to completely learn the 3.5 version, and we speak about 4.0 version. I saw the &amp;quot;Mads’ New Features in C# 4.0 Paper&amp;quot;, I already finished reading it and looks interesting. I like dynamics and also, I the COM improvements are welcome for me.&lt;/p&gt;
</description></item><item><title>re: New Features in C# 4.0 Paper, plus Feedback and Samples</title><link>http://blogs.msdn.com/charlie/archive/2008/11/04/new-features-in-c-4-0-paper-plus-feedback-and-samples.aspx#9050503</link><pubDate>Thu, 06 Nov 2008 23:52:23 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9050503</guid><dc:creator>AC</dc:creator><description>&lt;p&gt;I like the idea of named parameters. Code becomes less sensitive to parameter reordering, and it is also easy to read. Easier on code generators too. Is it really needed though? Need to read more on that.&lt;/p&gt;
&lt;p&gt;I don't like the idea of default parameters.&lt;/p&gt;
&lt;p&gt;We already have a mechanism for that. It's called method overloading. &lt;/p&gt;
&lt;p&gt;You could also argue with extension methods client code doesn't even need default parameters, because client code can, for lack of a better term, 'monkey patch' 3rd party classes.&lt;/p&gt;
&lt;p&gt;public static int FooWithDefault( this MyClass c, string s )&lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp;return c.Foo(&amp;quot;default1&amp;quot;, &amp;quot;default2&amp;quot;, s);&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;c.FooWithDefault(&amp;quot;Hello&amp;quot;) is better than c.Foo( ,,&amp;quot;Hello&amp;quot;)&lt;/p&gt;
&lt;p&gt;It was (maybe still is) a nightmare in VB.&lt;/p&gt;
&lt;p&gt;Even worse, when the MyClass changes it's defaults, perfectly working, compiled client code no longer works as it might have. (The same can happen with overloads)&lt;/p&gt;
&lt;p&gt;dynamic - I didn't like the idea of at first, but have done some reflection stuff in the past, and reflection code is messy. dynamic as a reflection 2.0 is cool (when not abused).&lt;/p&gt;
</description></item><item><title>re: New Features in C# 4.0 Paper, plus Feedback and Samples</title><link>http://blogs.msdn.com/charlie/archive/2008/11/04/new-features-in-c-4-0-paper-plus-feedback-and-samples.aspx#9051898</link><pubDate>Fri, 07 Nov 2008 12:41:15 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9051898</guid><dc:creator>Sadek Drobi</dc:creator><description>&lt;p&gt;We need better type inference in C#. Currently type inferrence in C# is really poor compared to F# or Haskell!&lt;/p&gt;
</description></item><item><title>re: New Features in C# 4.0 Paper, plus Feedback and Samples</title><link>http://blogs.msdn.com/charlie/archive/2008/11/04/new-features-in-c-4-0-paper-plus-feedback-and-samples.aspx#9051914</link><pubDate>Fri, 07 Nov 2008 12:58:54 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9051914</guid><dc:creator>Silas</dc:creator><description>&lt;p&gt;Im concerned how intelliesense will work with dynamics.. I mean, since the compiler at design time does not know which type your object is, how will intellisense react to the potential garbage method you write? Maybe they'll show the appropriate method available if the name is unique to the imported libraries?&lt;/p&gt;
&lt;p&gt;And yes, Im as concerned as everyone else with the optional parameters.. if one wants VB, one should use VB.&lt;/p&gt;
</description></item><item><title>re: New Features in C# 4.0 Paper, plus Feedback and Samples</title><link>http://blogs.msdn.com/charlie/archive/2008/11/04/new-features-in-c-4-0-paper-plus-feedback-and-samples.aspx#9052968</link><pubDate>Fri, 07 Nov 2008 23:02:36 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9052968</guid><dc:creator>Charlie Calvert</dc:creator><description>&lt;p&gt;One other quick point I should make here. This syntax for optional parameters is not valid in C# 4.0:&lt;/p&gt;
&lt;p&gt;M &amp;quot;Hello World&amp;quot;,,,&amp;quot;Hello&amp;quot;&lt;/p&gt;
&lt;p&gt;You can only use named parameters, you can't use this comma based syntax. The reason for this decision was to keep the syntax as clean and simple as possible. So the call above might look something like this:&lt;/p&gt;
&lt;p&gt;M(Title: &amp;quot;Hello World&amp;quot;, Caption: &amp;quot;Hello&amp;quot;);&lt;/p&gt;
&lt;p&gt;Which I think is fairly clear as compared to the empty commas. Here we name the parameters we want to specify, one being Title, and the other being Caption. Then we put in a colon, and finally we list the parameter we want to pass in, which in this case is &amp;quot;Hello World&amp;quot; and &amp;quot;Hello.&amp;quot;&lt;/p&gt;
&lt;p&gt;Again, I'll write more on this in a separate post.&lt;/p&gt;
&lt;p&gt;- Charlie&lt;/p&gt;
</description></item><item><title>re: New Features in C# 4.0 Paper, plus Feedback and Samples</title><link>http://blogs.msdn.com/charlie/archive/2008/11/04/new-features-in-c-4-0-paper-plus-feedback-and-samples.aspx#9053346</link><pubDate>Sat, 08 Nov 2008 03:08:01 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9053346</guid><dc:creator>Denny</dc:creator><description>&lt;p&gt;As a former Lisper, I absolutly have always wanted &amp;amp;optional, &amp;amp;key parameters with defaults. &amp;nbsp;BTW, I also want real macros...&lt;/p&gt;
</description></item><item><title>re: New Features in C# 4.0 Paper, plus Feedback and Samples</title><link>http://blogs.msdn.com/charlie/archive/2008/11/04/new-features-in-c-4-0-paper-plus-feedback-and-samples.aspx#9054308</link><pubDate>Sat, 08 Nov 2008 18:58:32 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9054308</guid><dc:creator>Amitabh Ojha</dc:creator><description>&lt;p&gt;I dare say C# 4.0's support for dynamically typed objects is leading to VC#A.&lt;/p&gt;
&lt;p&gt;Cheers!&lt;/p&gt;
&lt;p&gt;Amitabh&lt;/p&gt;
</description></item><item><title>New and Notable 277</title><link>http://blogs.msdn.com/charlie/archive/2008/11/04/new-features-in-c-4-0-paper-plus-feedback-and-samples.aspx#9054351</link><pubDate>Sat, 08 Nov 2008 19:49:43 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9054351</guid><dc:creator>Sam Gentile  If (DeveloperTask==Communication &amp;&amp; OS==Windows) </dc:creator><description>&lt;p&gt;jQuery/ASP.NET/ASP.NET AJAX/ASP.NET MVC Visual Studio patched for better jQuery IntelliSense . Yes! Steven&lt;/p&gt;
</description></item><item><title>re: New Features in C# 4.0 Paper, plus Feedback and Samples</title><link>http://blogs.msdn.com/charlie/archive/2008/11/04/new-features-in-c-4-0-paper-plus-feedback-and-samples.aspx#9055493</link><pubDate>Sun, 09 Nov 2008 14:19:34 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9055493</guid><dc:creator>Herve</dc:creator><description>&lt;p&gt;I'm concerned by the fact that they try do everything (and more) in C#. It seems that it will be very difficult to understand at the end. I'm OK for the .NET framework being able to cope with dynamic languages, but why adding a dynamic keyword to C# ? C# was not designed to be a dynamic language at the beginning, hence the need to add this keyword maybe ? true dynamic languages do not have this keyword, and they don't need it !!!&lt;/p&gt;
&lt;p&gt;People are always wining about Java beginning to be complex (with all these libraries in the core JDK), but I'm curious to know what they already think about C# 3.0, and what they will think of C# 4.0. Maybe all of this is a matter of marketing after all ;-)&lt;/p&gt;
</description></item><item><title>re: New Features in C# 4.0 Paper, plus Feedback and Samples</title><link>http://blogs.msdn.com/charlie/archive/2008/11/04/new-features-in-c-4-0-paper-plus-feedback-and-samples.aspx#9056861</link><pubDate>Mon, 10 Nov 2008 08:12:13 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9056861</guid><dc:creator>water</dc:creator><description>&lt;p&gt;The C# langauage changes too faster to we learn it hardly.&lt;/p&gt;
</description></item><item><title>re: New Features in C# 4.0 Paper, plus Feedback and Samples</title><link>http://blogs.msdn.com/charlie/archive/2008/11/04/new-features-in-c-4-0-paper-plus-feedback-and-samples.aspx#9057120</link><pubDate>Mon, 10 Nov 2008 12:59:18 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9057120</guid><dc:creator>Sorin Dolha, DlhSoft</dc:creator><description>&lt;p&gt;Regarding the first post: we (at DlhSoft) have developed multiple products in C# basically because we have more C# experienced programmers. However, in some cases, we ended up with as many as 20-30 overloaded constructors (or methods) simply because in C# 3.0 we didn't have optional parameters. I think it's a good thing to have this in C# too, as a gain from &amp;quot;co-existence&amp;quot; of C# and VB .NET. It's not like &amp;quot;we will use VB .NET just because it has optional parameters&amp;quot;, especially when we have a lot of experienced developers using C# already. It wouldn't be productive at all. And therefore I agree that purism/idealism should be sometimes defeated by practical reasons. Sorry guys...&lt;/p&gt;
</description></item><item><title>re: New Features in C# 4.0 Paper, plus Feedback and Samples</title><link>http://blogs.msdn.com/charlie/archive/2008/11/04/new-features-in-c-4-0-paper-plus-feedback-and-samples.aspx#9057126</link><pubDate>Mon, 10 Nov 2008 13:06:21 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9057126</guid><dc:creator>Charles Garnler</dc:creator><description>&lt;p&gt;What about 'break twice', or break(n), to break out of several nested loops? I've written too much such code either using boolean flags (which increases the line count without adding any real functionality) or some gotos (for too long that's been the way all programmers have had to do it). The ability to specify the number of times to break a loop at the language level could actually be extremely useful, and I don't know of any language that supports it.&lt;/p&gt;
</description></item><item><title>re: New Features in C# 4.0 Paper, plus Feedback and Samples</title><link>http://blogs.msdn.com/charlie/archive/2008/11/04/new-features-in-c-4-0-paper-plus-feedback-and-samples.aspx#9057367</link><pubDate>Mon, 10 Nov 2008 16:38:49 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9057367</guid><dc:creator>David C</dc:creator><description>&lt;p&gt;Sorry but I have to agree with the first commenter and others - just say &amp;quot;no&amp;quot; to optional parameters in C#. &amp;nbsp;We do not need a language that &amp;quot;holds our hand&amp;quot; so much. &amp;nbsp;There is already a .Net language that does that, it's called Visual Basic. &amp;nbsp;I've worked with both languages quite a bit and I very much prefer the conciseness and, as another put it, purity of C# over VB's verboseness and hard to read ugly code. &amp;nbsp;I love you guys at MS, I really do, but I think you are missing the mark if you put optional parameters into C#.&lt;/p&gt;
</description></item><item><title>re: New Features in C# 4.0 Paper, plus Feedback and Samples</title><link>http://blogs.msdn.com/charlie/archive/2008/11/04/new-features-in-c-4-0-paper-plus-feedback-and-samples.aspx#9057986</link><pubDate>Mon, 10 Nov 2008 18:17:44 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9057986</guid><dc:creator>Optional Parms</dc:creator><description>&lt;p&gt;Some seem to forget that C++ has optional parameters. &amp;nbsp;I know of many of the developers that I hwave worked with that are looking forward to them being added to have the feature more like C++.&lt;/p&gt;
</description></item><item><title>re: New Features in C# 4.0 Paper, plus Feedback and Samples</title><link>http://blogs.msdn.com/charlie/archive/2008/11/04/new-features-in-c-4-0-paper-plus-feedback-and-samples.aspx#9059432</link><pubDate>Tue, 11 Nov 2008 11:02:31 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9059432</guid><dc:creator>atakavci</dc:creator><description>&lt;p&gt;ok , now i know there is someone else who feels like c# 4.0 is 'com and/or VB' oriented c#.&lt;/p&gt;
&lt;p&gt;yes,, dynamics is good way to avoid reflection mess, and code may look elegant.&lt;/p&gt;
&lt;p&gt;and variance seems handy.&lt;/p&gt;
&lt;p&gt;but i think optional parameters and named parameters are subjects to argue.&lt;/p&gt;
&lt;p&gt;does optional parameters feature seem to an effort to stand close to former VB developers.&lt;/p&gt;
&lt;p&gt;quote from Herve&lt;/p&gt;
&lt;p&gt;	&amp;quot;Maybe all of this is a matter of marketing after all ;-) &amp;quot;&lt;/p&gt;
&lt;p&gt;i believe optional parameters and named parameters will end up with less readable code on our projects and everywhere on internet (may be it also belongs to us as the people who aware of the situation).&lt;/p&gt;
</description></item><item><title>re: New Features in C# 4.0 Paper, plus Feedback and Samples</title><link>http://blogs.msdn.com/charlie/archive/2008/11/04/new-features-in-c-4-0-paper-plus-feedback-and-samples.aspx#9059447</link><pubDate>Tue, 11 Nov 2008 11:20:36 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9059447</guid><dc:creator>silashansen</dc:creator><description>&lt;p&gt;yes, C++ has them, but only as the last optional parameter, which makes very much sense.&lt;/p&gt;
&lt;p&gt;Means you can do:&lt;/p&gt;
&lt;p&gt;M(&amp;quot;foo&amp;quot;, &amp;quot;bar&amp;quot;, &amp;quot;now&amp;quot;);&lt;/p&gt;
&lt;p&gt;M(&amp;quot;foo&amp;quot;, &amp;quot;bar&amp;quot;); //default 3. parameter: &amp;quot;now&amp;quot;&lt;/p&gt;
&lt;p&gt;but not&lt;/p&gt;
&lt;p&gt;M(&amp;quot;foo&amp;quot;, ,&amp;quot;now&amp;quot;); &amp;lt;-- really guys, this is ugly which is why C++ probably didnt implement it.&lt;/p&gt;
&lt;p&gt;I could tolereate that C# implemented it that way also as it keeps the method calls clean to look at, except last parameter. Going with the named parameter hell will add too much garbage overhead to the code.&lt;/p&gt;
</description></item><item><title>re: New Features in C# 4.0 Paper, plus Feedback and Samples</title><link>http://blogs.msdn.com/charlie/archive/2008/11/04/new-features-in-c-4-0-paper-plus-feedback-and-samples.aspx#9060841</link><pubDate>Wed, 12 Nov 2008 00:48:37 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9060841</guid><dc:creator>Jesper</dc:creator><description>&lt;p&gt;silashansen: Yes, that's ugly, which is why C#4 doesn't support it. Read up. If you skip parameters, you have to pass them by name, which preserves clarity.&lt;/p&gt;
&lt;p&gt;The reason default and optional parameters are both useful is because if you have a bunch of methods that can take more or less parameters, you will soon be drowning in overloads since it may be practical to have different combinations of the parameters use their default value.&lt;/p&gt;
</description></item><item><title>re: New Features in C# 4.0 Paper, plus Feedback and Samples</title><link>http://blogs.msdn.com/charlie/archive/2008/11/04/new-features-in-c-4-0-paper-plus-feedback-and-samples.aspx#9062277</link><pubDate>Wed, 12 Nov 2008 15:00:10 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9062277</guid><dc:creator>llorrac</dc:creator><description>&lt;p&gt;As a development manager, I applaud the decision to include optional parameters and named arguments. I have never understood why the architects of C# felt it was better to be forced to write, test and maintain multiple versions of the same rountine when a single version woud do the job. I recognize overloading is useful in may circumstances, but there are also cases where it makes the developed code more difficult to understand, test and maintain.&lt;/p&gt;
</description></item><item><title>C# 4.0 New Features</title><link>http://blogs.msdn.com/charlie/archive/2008/11/04/new-features-in-c-4-0-paper-plus-feedback-and-samples.aspx#9062682</link><pubDate>Wed, 12 Nov 2008 17:01:17 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9062682</guid><dc:creator>Guy     kolbis</dc:creator><description>&lt;p&gt;There are a few new features coming out in C# 4.0. I gathered some posts that will help you to &amp;amp;quot;get&lt;/p&gt;
</description></item><item><title>re: New Features in C# 4.0 Paper, plus Feedback and Samples</title><link>http://blogs.msdn.com/charlie/archive/2008/11/04/new-features-in-c-4-0-paper-plus-feedback-and-samples.aspx#9063307</link><pubDate>Wed, 12 Nov 2008 19:48:14 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9063307</guid><dc:creator>Seablade</dc:creator><description>&lt;p&gt;I have to say that all of you should get over the optional parameter angst in C# 4.0 and quit making such a hullabaloo over it. &amp;nbsp;I've programmed with Visual Basic for many years (and still do) and C# for the last 4 years and I welcome the change.&lt;/p&gt;
&lt;p&gt;Let's face it: &amp;nbsp;if you don't like optional parameters and named parametes, JUST DON'T USE THEM! &amp;nbsp;If you're a manager and really want to stick it to your underlings, forbid its usage! &amp;nbsp;It's as simple as that. &amp;nbsp;I don't understand all the hoopla surrounding this simple feature.&lt;/p&gt;
&lt;p&gt;I prefer method overloading where the methods really do very simple tasks, but I've had to write numerous overloads for a method where the only call inside each overload is to a core method. &amp;nbsp;I really would have rather written a single core method where it made sense and provide optional values.&lt;/p&gt;
&lt;p&gt;All of C#'s changes and VB's changes are to bring them to essentially the same technological level and this is a most welcome change; I work in a shop where both languages are used extensively and it's really hard for my fellow VB programmers to use the technology that I use and conversely I the same when programming C#.&lt;/p&gt;
&lt;p&gt;Just get over it.&lt;/p&gt;
</description></item><item><title>re: New Features in C# 4.0 Paper, plus Feedback and Samples</title><link>http://blogs.msdn.com/charlie/archive/2008/11/04/new-features-in-c-4-0-paper-plus-feedback-and-samples.aspx#9065830</link><pubDate>Thu, 13 Nov 2008 12:46:45 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9065830</guid><dc:creator>Michel</dc:creator><description>&lt;p&gt;Charlie, what i would like is something like property pointers. AFAIK that's not possible now.&lt;/p&gt;
</description></item><item><title>re: New Features in C# 4.0 Paper, plus Feedback and Samples</title><link>http://blogs.msdn.com/charlie/archive/2008/11/04/new-features-in-c-4-0-paper-plus-feedback-and-samples.aspx#9068191</link><pubDate>Fri, 14 Nov 2008 05:04:25 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9068191</guid><dc:creator>Will</dc:creator><description>&lt;p&gt;Most of the features in C# 4.0 are already there in VB.&lt;/p&gt;
&lt;p&gt;Sounds there are really few things to improve for those languages.&lt;/p&gt;
</description></item><item><title>re: New Features in C# 4.0 Paper, plus Feedback and Samples</title><link>http://blogs.msdn.com/charlie/archive/2008/11/04/new-features-in-c-4-0-paper-plus-feedback-and-samples.aspx#9070334</link><pubDate>Fri, 14 Nov 2008 16:39:11 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9070334</guid><dc:creator>int19h</dc:creator><description>&lt;p&gt;There is a very simple example to demonstrate why optional &amp;amp; keyword arguments improve code readability. Compare:&lt;/p&gt;
&lt;p&gt; &amp;nbsp;new MemoryStream(data, 0, buffer.Length, true)&lt;/p&gt;
&lt;p&gt;and&lt;/p&gt;
&lt;p&gt; &amp;nbsp;new MemoryStream(data, index: 0, count: buffer.length, writable: true)&lt;/p&gt;
</description></item><item><title>re: New Features in C# 4.0 Paper, plus Feedback and Samples</title><link>http://blogs.msdn.com/charlie/archive/2008/11/04/new-features-in-c-4-0-paper-plus-feedback-and-samples.aspx#9079231</link><pubDate>Sat, 15 Nov 2008 00:32:55 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9079231</guid><dc:creator>kemal erdogan</dc:creator><description>&lt;p&gt;Am I the only one here to recognize that the most significant change is the inclusion of covariance of generic type parameters! &lt;/p&gt;
&lt;p&gt;It will make generics a lot more useful tool and finally allow us to make them part of our APIs as they are polymorphic now&lt;/p&gt;
</description></item><item><title>re: New Features in C# 4.0 Paper, plus Feedback and Samples</title><link>http://blogs.msdn.com/charlie/archive/2008/11/04/new-features-in-c-4-0-paper-plus-feedback-and-samples.aspx#9079843</link><pubDate>Sat, 15 Nov 2008 00:59:58 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9079843</guid><dc:creator>Dmitri</dc:creator><description>&lt;p&gt;Personally, I am somewhat disappointed with this new set of features. There's nothing here that one would go &amp;quot;woo-hoo!&amp;quot; about, compared to C# 3.0.&lt;/p&gt;
</description></item><item><title>re: New Features in C# 4.0 Paper, plus Feedback and Samples</title><link>http://blogs.msdn.com/charlie/archive/2008/11/04/new-features-in-c-4-0-paper-plus-feedback-and-samples.aspx#9100869</link><pubDate>Sat, 15 Nov 2008 20:13:58 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9100869</guid><dc:creator>Peter </dc:creator><description>&lt;p&gt;I am new to programming. I have started working with c# 3.0 with .Net Framework 3.5. I am discouraged by the fact that a new version of teh language and new version of .net framework is coming out soon. Shoud I wait until teh new langugae debuts and then start my learning path? Or should I Continue with my learning with current standards. &lt;/p&gt;
&lt;p&gt;Please advise. &lt;/p&gt;
</description></item><item><title>re: New Features in C# 4.0 Paper, plus Feedback and Samples</title><link>http://blogs.msdn.com/charlie/archive/2008/11/04/new-features-in-c-4-0-paper-plus-feedback-and-samples.aspx#9102768</link><pubDate>Sun, 16 Nov 2008 12:28:12 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9102768</guid><dc:creator>int19h</dc:creator><description>&lt;p&gt;Peter, you should understand that new versions will keep coming out probably with the same rate (.NET 1.0 was in 2002, 1.1 in 2003, 2.0 in 2005, 3.0 in 2006, 3.5 in 2007, 3.5 SP1 in 2008). If you will wait for the next version to start learning, you will never finish :) In this industry, you have to be able to pick up the new stuff as you go. &lt;/p&gt;
&lt;p&gt;But, anyway, the majority of the .NET Framework remains, and of course everything that's in C# 3.0 will still be in C# 4.0, and heavily used as well... so you'd have to learn it one way or another - and then, why not start now?&lt;/p&gt;
</description></item><item><title>re: New Features in C# 4.0 Paper, plus Feedback and Samples</title><link>http://blogs.msdn.com/charlie/archive/2008/11/04/new-features-in-c-4-0-paper-plus-feedback-and-samples.aspx#9111610</link><pubDate>Mon, 17 Nov 2008 20:43:20 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9111610</guid><dc:creator>ice </dc:creator><description>&lt;p&gt;Any chance .NET 4.0 will have the ability to turn background compilation on/off for the C# users? It would be nice to have the option at times to utilize it. That's about the only thing I miss from VB even though it is not optional there and would at times drag my system with VS 2003 but it didn't seem too bad in VS 2005. &lt;/p&gt;
</description></item><item><title>re: New Features in C# 4.0 Paper, plus Feedback and Samples</title><link>http://blogs.msdn.com/charlie/archive/2008/11/04/new-features-in-c-4-0-paper-plus-feedback-and-samples.aspx#9116171</link><pubDate>Tue, 18 Nov 2008 07:02:42 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9116171</guid><dc:creator>Avi Farah</dc:creator><description>&lt;p&gt;I saw only one request for break(n). &amp;nbsp;I do like the Java way of breaking from nested loops where the loop is labeled and you break from the specific labeled loop.&lt;/p&gt;
&lt;p&gt;This is the only place I will use a goto where you look for a 0 in a matrix of numbers. &amp;nbsp;You need to break from a nested for (row..) nested within for (col..) &amp;nbsp;Having break(n) or break label will plug this hole.&lt;/p&gt;
&lt;p&gt;Thnx,&lt;/p&gt;
&lt;p&gt;Avi&lt;/p&gt;
</description></item><item><title>re: New Features in C# 4.0 Paper, plus Feedback and Samples</title><link>http://blogs.msdn.com/charlie/archive/2008/11/04/new-features-in-c-4-0-paper-plus-feedback-and-samples.aspx#9123401</link><pubDate>Wed, 19 Nov 2008 13:05:09 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9123401</guid><dc:creator>silashansen</dc:creator><description>&lt;p&gt;break(n)-like feature would be greatly appreciated too!&lt;/p&gt;
</description></item><item><title>re: New Features in C# 4.0 Paper, plus Feedback and Samples</title><link>http://blogs.msdn.com/charlie/archive/2008/11/04/new-features-in-c-4-0-paper-plus-feedback-and-samples.aspx#9125984</link><pubDate>Thu, 20 Nov 2008 00:11:44 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9125984</guid><dc:creator>int19h</dc:creator><description>&lt;p&gt;Guys, there's nothing wrong with goto to break out of a loop. It's not an Inherently Evil Statement. It's a wrong tool for many jobs, but breaking out of nested loops isn't one. If you want labelled break just so that you won't have to write &amp;quot;goto&amp;quot;, then you should pause for a moment and consider the reasons for your phobia :)&lt;/p&gt;
</description></item><item><title>Links about Visual Studio 2010 and C# 4.0</title><link>http://blogs.msdn.com/charlie/archive/2008/11/04/new-features-in-c-4-0-paper-plus-feedback-and-samples.aspx#9131502</link><pubDate>Fri, 21 Nov 2008 10:00:01 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9131502</guid><dc:creator>Kirill Osenkov</dc:creator><description>&lt;p&gt;A while ago we announced Visual Studio 2010 and C# 4.0. In case you'd like to catch up and read articles&lt;/p&gt;
</description></item><item><title>callbacks and event handlers</title><link>http://blogs.msdn.com/charlie/archive/2008/11/04/new-features-in-c-4-0-paper-plus-feedback-and-samples.aspx#9137434</link><pubDate>Mon, 24 Nov 2008 18:15:49 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9137434</guid><dc:creator>David Jacobson</dc:creator><description>&lt;p&gt;The new features will be very useful to anyone who wants to use C# in combination with the HTML DOM, Javascript, or COM. &amp;nbsp;Those purists who are not interested don't need to use them.&lt;/p&gt;
&lt;p&gt;However, there is one significant part of the story that has been skipped over in the presentations that I have seen. &amp;nbsp;That is the issue of passing delegates to dynamic code to be used as callbacks or event handlers. &amp;nbsp;Virtual Earth seems to be a favorite example. &amp;nbsp;But a C# to VE interface will be pretty limited unless you can call VE with C# methods that will be used by VE to pass back results or to handle VE events. &amp;nbsp;I assume this point has not been overlooked by the C# team. &amp;nbsp;So I am a little puzzled why nobody seems to be commenting on it at all.&lt;/p&gt;
</description></item><item><title>re: New Features in C# 4.0 Paper, plus Feedback and Samples</title><link>http://blogs.msdn.com/charlie/archive/2008/11/04/new-features-in-c-4-0-paper-plus-feedback-and-samples.aspx#9143945</link><pubDate>Wed, 26 Nov 2008 14:25:14 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9143945</guid><dc:creator>Steve Adey</dc:creator><description>&lt;p&gt;I can see the nice clean new implementation of optional parameters. &amp;nbsp;Method overloading is not always possible. &amp;nbsp;Take the following:&lt;/p&gt;
&lt;p&gt;Foo(string str1, string str2, string str3)&lt;/p&gt;
&lt;p&gt;you want 2 overloads, one to set str1 and str2 and one to set str2 and str3. &amp;nbsp;How you going to do that with overloading?&lt;/p&gt;
&lt;p&gt;This can only be achieved with optional parameters.&lt;/p&gt;
</description></item><item><title>re: New Features in C# 4.0 Paper, plus Feedback and Samples</title><link>http://blogs.msdn.com/charlie/archive/2008/11/04/new-features-in-c-4-0-paper-plus-feedback-and-samples.aspx#9144970</link><pubDate>Wed, 26 Nov 2008 20:18:31 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9144970</guid><dc:creator>John Marrone</dc:creator><description>&lt;p&gt;Steve, you are so right. I have run into this so many times I have had to change the methods name to get around it. Heck, if you don't like optional parameters don't use them.&lt;/p&gt;
</description></item><item><title>re: New Features in C# 4.0 Paper, plus Feedback and Samples</title><link>http://blogs.msdn.com/charlie/archive/2008/11/04/new-features-in-c-4-0-paper-plus-feedback-and-samples.aspx#9145093</link><pubDate>Wed, 26 Nov 2008 21:38:37 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9145093</guid><dc:creator>Derek Licciardi</dc:creator><description>&lt;p&gt;[Incoming semi rant]&lt;/p&gt;
&lt;p&gt;I too am against the idea of optional parameters. &amp;nbsp;To the person that complained of 20 or so overloaded constructors, that's what you're supposed to do. &amp;nbsp;Methods and constructors should have a single minded purpose and enforce a contract to the outside world. &amp;nbsp;If you include optional parameters on a constructor then you open the object to be used in scenarios where the contract isn't full understood. &amp;nbsp;Optional parameters need to be accounted for in the body of the constructor and that means the constructor will have multiple uses, under multiple conditions which isn't using proper encapsulation and polymorphism. &amp;nbsp;The black box this creates is problematic for consumers of your objects.&lt;/p&gt;
&lt;p&gt;If I had what I wanted in C#, I'd like polymorphism to be name/type aware instead of just type aware. &amp;nbsp;I'd like to be able to declare a method A(UserID int, ...) and A(CompanyID int, ...) and have the compiler recognize that these are two different methods. &amp;nbsp;Today that doesn't happen because of the way the call stack evaluates methods in polymorphic scenarios so I am left writing AforCompanyID(ID int, ...) and AforUserID(ID int, ...) which of course removes some of the benefits of polymorphic behavior.&lt;/p&gt;
&lt;p&gt;Please note, I want two seperate methods in my example. &amp;nbsp;I want two methods that each implement a specific piece of my object's contract with the outside world. &amp;nbsp;What I don't want is A(UserID int, CompanyID int, ...) because that's not readable and it black boxes a switch statement that increases the method's dependencies throughout the application and is not visible to the object's consumer.&lt;/p&gt;
&lt;p&gt;Optional parameters, like anonymous methods and functions invite developer laziness and don't work well in a corporate environment where code standards matter.&lt;/p&gt;
</description></item><item><title>re: New Features in C# 4.0 Paper, plus Feedback and Samples</title><link>http://blogs.msdn.com/charlie/archive/2008/11/04/new-features-in-c-4-0-paper-plus-feedback-and-samples.aspx#9158530</link><pubDate>Sun, 30 Nov 2008 21:03:26 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9158530</guid><dc:creator>dcf</dc:creator><description>&lt;p&gt;Derek, I see your points to some degree, but at the same time I'm not sure I can completely agree. &amp;nbsp;If done right, optional parameters with the proper defaults can make code more readable and easier to code. &amp;nbsp;And with intellisense you, as the creator of the method, can impart more knowledge about how the parameters are used - which ones are critical to the function of the method and which ones can be defaulted out.&lt;/p&gt;
&lt;p&gt;To your point on having two different methods with the same name, but different first parameter names, I can only see chaos from the point of maintainability down the road. &amp;nbsp;Consider the following use:&lt;/p&gt;
&lt;p&gt;Instance.A(100)&lt;/p&gt;
&lt;p&gt;Instance.A(200) &lt;/p&gt;
&lt;p&gt;Which one of these is the userid? and which is the companyid? &amp;nbsp;Sure we could say:&lt;/p&gt;
&lt;p&gt;Instance.A(UserID=100)&lt;/p&gt;
&lt;p&gt;or&lt;/p&gt;
&lt;p&gt;Instance.A(CompanyID=200)&lt;/p&gt;
&lt;p&gt;But do I really want to do all that typing? &amp;nbsp;Also, in spite of all these new 4.0 features, I think the authors of .NET Framework Design Guidelines would have something to say about method overloading and parameter positions...Shifting the meaning of the a parameter position (regardless of new language features) just seems like a bad idea in general.&lt;/p&gt;
</description></item><item><title>re: New Features in C# 4.0 Paper, plus Feedback and Samples</title><link>http://blogs.msdn.com/charlie/archive/2008/11/04/new-features-in-c-4-0-paper-plus-feedback-and-samples.aspx#9160391</link><pubDate>Mon, 01 Dec 2008 16:08:20 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9160391</guid><dc:creator>Derek Licciardi</dc:creator><description>&lt;p&gt;The problem space in and of itself is a tricky one to solve. It either involves what I was talking about or optional parameters. &amp;nbsp;Neither solution is elegant and both have their own related drawbacks. &amp;nbsp;I guess I am ok with the way C# evolves as long as I can continue to use C# in the typesafe, non-optional-parameter based world I and my developers have been accustomed to. &amp;nbsp;Honestly, the situation does not arise that often for us because most of the time the issue can be worked around relatively easily by changing the design. &amp;nbsp;What I don't want to see is dynamics used everywhere. &amp;nbsp;I've been there. &amp;nbsp;It's called VBScript and that's partly how SQL Injection attacks were born. &amp;nbsp;Developers not understanding the type of variable they were working with and thusly not knowing when to protect said variable from certain attack vectors like SQL injection...&lt;/p&gt;
</description></item><item><title>re: New Features in C# 4.0 Paper, plus Feedback and Samples</title><link>http://blogs.msdn.com/charlie/archive/2008/11/04/new-features-in-c-4-0-paper-plus-feedback-and-samples.aspx#9160974</link><pubDate>Mon, 01 Dec 2008 20:27:39 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9160974</guid><dc:creator>Steven Behnke</dc:creator><description>&lt;p&gt;There is a small typo on page 3 of the document. &amp;nbsp;Under the heading: Dynamic Operations in the comments of the following line&lt;/p&gt;
&lt;p&gt;d[“one”] = d[“two”]; // getting and setting thorugh indexers&lt;/p&gt;
&lt;p&gt;Through is misspelled.&lt;/p&gt;
</description></item><item><title>re: New Features in C# 4.0 Paper, plus Feedback and Samples</title><link>http://blogs.msdn.com/charlie/archive/2008/11/04/new-features-in-c-4-0-paper-plus-feedback-and-samples.aspx#9161678</link><pubDate>Tue, 02 Dec 2008 00:11:15 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9161678</guid><dc:creator>Paul</dc:creator><description>&lt;p&gt;hmmmm... i think if you need 20 constructor overloads on a class then optional parameters arent going to save you from a completely horrible lack of design or thought about what you are doing... sorry but that's just insane. Would you prefer one constructor with 20 * n optional params? Uggh! &lt;/p&gt;
&lt;p&gt;That said, i was always opposed to optional params (esp of the ,,, syntax variety), but the way it's been done in c# 4.0 isn't too bad. Personally i prefer overloading because of the neatness it provides when cascading the 'optionals' down - but we'll see. At the end of the day, &amp;nbsp;if you design your systems and classes properly in the first place, optionals should really pose few issues, even to purists. &amp;nbsp;As an example, think in terms of parameter objects, (wrapping params into one single object and passing that) - we can use class initialisers already which have similar name/value syntax to optionals, so optionals may actualy be quite helpful in terms of creating strong 'Message' Types for services and hard to break contracts. &amp;nbsp;It's all about design - if you don't think through the code you write then optional params (or lack thereof) really arent' going to make a difference. &lt;/p&gt;
</description></item><item><title>re: New Features in C# 4.0 Paper, plus Feedback and Samples</title><link>http://blogs.msdn.com/charlie/archive/2008/11/04/new-features-in-c-4-0-paper-plus-feedback-and-samples.aspx#9161684</link><pubDate>Tue, 02 Dec 2008 00:13:35 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9161684</guid><dc:creator>Paul</dc:creator><description>&lt;p&gt;ps.. the example of the memory stream from int19h is case in point why something that might of seemed nasty in the past, isn't actually all that bad. Excellent example.&lt;/p&gt;
</description></item><item><title>re: New Features in C# 4.0 Paper, plus Feedback and Samples</title><link>http://blogs.msdn.com/charlie/archive/2008/11/04/new-features-in-c-4-0-paper-plus-feedback-and-samples.aspx#9164605</link><pubDate>Tue, 02 Dec 2008 17:07:36 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9164605</guid><dc:creator>llorrac</dc:creator><description>&lt;p&gt;Perhaps it's the code I develop but I would find as construct like -- if (name in {&amp;quot;Fred&amp;quot;, &amp;quot;Tom&amp;quot;, Mary&amp;quot;}) -- extremely useful. I realize there are several ways to do this using the current syntax but don't feel any are quite as compact or clear from a documentation perspective.&lt;/p&gt;
</description></item><item><title>New stuff in C# 4.0</title><link>http://blogs.msdn.com/charlie/archive/2008/11/04/new-features-in-c-4-0-paper-plus-feedback-and-samples.aspx#9166139</link><pubDate>Tue, 02 Dec 2008 23:43:25 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9166139</guid><dc:creator>Ales Rosina's Another .NET Blog</dc:creator><description>&lt;p&gt;I’m just prepering for a presentation of new features in VS 2010 and .NET Framework 4.0, so let me give&lt;/p&gt;
</description></item><item><title>re: New Features in C# 4.0 Paper, plus Feedback and Samples</title><link>http://blogs.msdn.com/charlie/archive/2008/11/04/new-features-in-c-4-0-paper-plus-feedback-and-samples.aspx#9170584</link><pubDate>Wed, 03 Dec 2008 19:04:52 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9170584</guid><dc:creator>Wytek Szymanski</dc:creator><description>&lt;p&gt;How about the ability to alias class and method names? That would be very useful to most of us who cannot invent proper class and method names as fast as we need to deliver the code. Here is a contrived example of what I find myself doing.&lt;/p&gt;
&lt;p&gt;public class SomeClass&lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; public void DoSomething() { }&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;Several weeks later after the class has been compiled into an assembly and the assembly has been referenced by everything else I find myself inspired ti rename it properly.&lt;/p&gt;
&lt;p&gt;public class ByteCounter&lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;public void CountBytes() { } &amp;nbsp; &lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;Rebuilding the universe leads to all kind of breakage because the SomeClass has disappeard.&lt;/p&gt;
&lt;p&gt;So why not correct bad naming like so:&lt;/p&gt;
&lt;p&gt;public class ByteCounter aka SomeClass&lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; public void CountBytes aka DoSomething() { }&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;The compiler could surely recognized the old names and issue some warning so that subesequent correction can be made at some later time.&lt;/p&gt;
</description></item><item><title>re: New Features in C# 4.0 Paper, plus Feedback and Samples</title><link>http://blogs.msdn.com/charlie/archive/2008/11/04/new-features-in-c-4-0-paper-plus-feedback-and-samples.aspx#9177178</link><pubDate>Fri, 05 Dec 2008 01:26:14 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9177178</guid><dc:creator>pss</dc:creator><description>&lt;p&gt;Wytek,&lt;/p&gt;
&lt;p&gt;I dont mean to be rude, but after a few minutes, or even after a few days, you should already know what the proper name of the class your writing is. More often than not, you should know the class name before you even start the code.&lt;/p&gt;
&lt;p&gt;As for the optional parameters, as previously stated, if people don't need/want it, then they shouldn't use it. To me it just makes C# more flexible by leaving out the defaults. It isn't exactly the same as overloading either.&lt;/p&gt;
&lt;p&gt;{end rant}&lt;/p&gt;
&lt;p&gt;Cheers!&lt;/p&gt;
</description></item><item><title>re: New Features in C# 4.0 Paper, plus Feedback and Samples</title><link>http://blogs.msdn.com/charlie/archive/2008/11/04/new-features-in-c-4-0-paper-plus-feedback-and-samples.aspx#9181366</link><pubDate>Sat, 06 Dec 2008 20:25:20 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9181366</guid><dc:creator>Sam</dc:creator><description>&lt;p&gt;To me, named optional parameters would be incredibly useful.&lt;/p&gt;
&lt;p&gt;It is ludicrous needing to have 20 constructers, when all you are logically trying to achieve is perhaps 5, but requiring 4 permutations of each (just for the sake of having to manually code in your optional parameters each time).&lt;/p&gt;
&lt;p&gt;And not only does it make it less maintainable, it becomes a lot less friendly to use, and find the version you are after.&lt;/p&gt;
&lt;p&gt;I think the frightened belief of those against this feature, stems from the fear that only one constructor would be created and with say 10 optional arguments. Therefore, there is no logical guidance of which parameters should be exclusively, required in combination. This discipline, I think belongs to partitioning and modelling the constructors correctly.&lt;/p&gt;
&lt;p&gt;Also, I believe the code should reflect as strongly as possible, the subject matter of the object, and not mainly lines of a bunch of copied and pasted constructors.&lt;/p&gt;
</description></item><item><title>re: New Features in C# 4.0 Paper, plus Feedback and Samples</title><link>http://blogs.msdn.com/charlie/archive/2008/11/04/new-features-in-c-4-0-paper-plus-feedback-and-samples.aspx#9185190</link><pubDate>Mon, 08 Dec 2008 21:21:40 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9185190</guid><dc:creator>Bart</dc:creator><description>&lt;p&gt;I don't get the rational for introducing VB-like features into C# and vice versa. These are 2 different languages and attempts to make them similar will, at best, create two languages that are indistinguishable. And at worst, create 2 languages that appeal to neither VB followers nor C# followers. &lt;/p&gt;
</description></item><item><title>re: New Features in C# 4.0 Paper, plus Feedback and Samples</title><link>http://blogs.msdn.com/charlie/archive/2008/11/04/new-features-in-c-4-0-paper-plus-feedback-and-samples.aspx#9186750</link><pubDate>Tue, 09 Dec 2008 11:43:25 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9186750</guid><dc:creator>int19h</dc:creator><description>&lt;p&gt;For those in the &amp;quot;overloading is better than optional parameters&amp;quot; camp - why not just treat optional parameters as a syntactic sugar for hand-writing all those 20 overloads? In which case, how is it any better or worse?&lt;/p&gt;
</description></item><item><title>re: New Features in C# 4.0 Paper, plus Feedback and Samples</title><link>http://blogs.msdn.com/charlie/archive/2008/11/04/new-features-in-c-4-0-paper-plus-feedback-and-samples.aspx#9187878</link><pubDate>Wed, 10 Dec 2008 00:19:39 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9187878</guid><dc:creator>Goran</dc:creator><description>&lt;p&gt;Has anyone remember Clipper? That was almost &amp;nbsp;20 years ago.&lt;/p&gt;
&lt;p&gt;1. Garbage collector, &lt;/p&gt;
&lt;p&gt;2. code blocks (exactly as lambda expressions),&lt;/p&gt;
&lt;p&gt;3. optional params as proposed in C#4 (except possibility to have empty one; just commas)&lt;/p&gt;
&lt;p&gt;4. macros as in javascript&lt;/p&gt;
&lt;p&gt;5. array assignments and access like &lt;/p&gt;
&lt;p&gt;arr = { { 1, 2, 3 }, {obj1, obj2}, &amp;quot;str1&amp;quot; }&lt;/p&gt;
&lt;p&gt;arr[1][2]&lt;/p&gt;
&lt;p&gt;6. type change in runtime &lt;/p&gt;
&lt;p&gt;a = 1&lt;/p&gt;
&lt;p&gt;a = &amp;quot;str&amp;quot;&lt;/p&gt;
&lt;p&gt;Maybe some things breaks strong type definitions, but there were lot of good stuff.&lt;/p&gt;
&lt;p&gt;I understand that it is really hard for C# to draw clear line and not to spoil langugage.&lt;/p&gt;
</description></item><item><title>re: New Features in C# 4.0 Paper, plus Feedback and Samples</title><link>http://blogs.msdn.com/charlie/archive/2008/11/04/new-features-in-c-4-0-paper-plus-feedback-and-samples.aspx#9199235</link><pubDate>Fri, 12 Dec 2008 03:12:01 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9199235</guid><dc:creator>Sriram Naresh Akula</dc:creator><description>&lt;p&gt;HI GUYS,&lt;/p&gt;
&lt;p&gt;I HAVE READ ALL THE PREVIOUS DISCUSSIONS.&lt;/p&gt;
&lt;p&gt;IT LOOKED FUNNY FOR ME BECAUSE MOST OF YOU GUYS ARE ROAMING AROUND OPTIONAL PARAMETERS ISSUE AND ARGUING ABOUT IT.&lt;/p&gt;
&lt;p&gt;I UNDERSTAND THE CONCERNS OF BOTH PARTIES.&lt;/p&gt;
&lt;p&gt;BUT FOR GUYS WHO HATE OPTIONAL PARMETERS FEATURE IN C# 4.0, CONSIDER MY REAL TIME EXAMPLE.&lt;/p&gt;
&lt;p&gt;eg:&lt;/p&gt;
&lt;p&gt;Suppose there was a Bakery Owner and a Customer(myself).&lt;/p&gt;
&lt;p&gt;Now Suppose, I was accustomed to or like to eat Pizza daily in that bakery. And after sometime the owner of the bakery want to attract more customers or want to provide more items in his bakery, so he introduces a new item called Burger which was not available before in this bakery and suppose I do not like burger.&lt;/p&gt;
&lt;p&gt;1. Do you guys mean that I have to smack down the owner for selling burger in his bakery because I only want to eat the pizza and don't like burger? &lt;/p&gt;
&lt;p&gt;2. What about other customers who want to eat a burger instead of pizza ?&lt;/p&gt;
&lt;p&gt;3. Why can't I only eat pizza in that bakery and never eat the burger. There was nothing ambarrassing to have an extra item in the bakery.&lt;/p&gt;
&lt;p&gt;4. The only situation I have to argue with the owner is, if he removes the item pizza from the bakery and replaces it with burger.&lt;/p&gt;
&lt;p&gt;5. If he is providing both pizza &amp;amp; burger in his bakery, why should I or anyone bother or argue with him. Myself or any other customer can select their own favourite and should feel happy for having the option to select any of these items to eat rather than having only one item which we should always eat.&lt;/p&gt;
&lt;p&gt;SO GUYS, PLEASE STOP HATING NEW FEATURES IN ANY LANGUAGE.&lt;/p&gt;
&lt;p&gt;THEY ARE ALL INTRODUCED TO MAKE THE DEVELOPER COMFORTABLE AND GIVE HIM THE OPTIONAL FEATURE TO SELECT OF HIS LIKING.&lt;/p&gt;
&lt;p&gt;THEY ARE ADDING THESE FEATURES WITHOUT REMOVING THE OLD FEATURES.&lt;/p&gt;
&lt;p&gt;SO IF YOU DON'T LIKE THE NEW FEATURE, JUST DON'T USE IT, USE THE OLD FEATURE, BUT WHY TO HATE IT OR BLAME THE C# TEAM.&lt;/p&gt;
&lt;p&gt;SOME GUY SAID THAT SOME FEATURES ARE THERE ALREADY IN VB.NET, THEN WHY INTODUCE THEM AGAIN IN C#.&lt;/p&gt;
&lt;p&gt;SUPPOSE THERE'S A GUY WHO CAME FROM C++ BACKGROUND AND NOW CODING HIS PROJECT IN C# AND HE DOESN'T KNOW VB.NET. NOW AT SOME PART OF HIS PROJECT HE NEEDS THE FEATURE LIKE OPTIONAL PARAMETER WHICH WAS ALREADY THERE IN VB.NET BUT NOT IN C#. THEN HOW CAN HE ACHIEVE THAT BECAUSE HE DOESN'T KNOW VB.NET. IN THIS CASE HIS PROGRAMMING LANGUAGE(C#) SHOULD ALSO HAVE A SIMILAR FEATURE SO THAT HE CAN CARRY ON WITH HIS PROJECT WITHOUT ANY HURDLES.&lt;/p&gt;
&lt;p&gt;SO DON'T MESS UP ARGUING ABOUT ONE TOPIC.&lt;/p&gt;
&lt;p&gt;THERE IS NOT REASON FOR YOU GUYS TO FEEL BAD TO HAVE MORE ARTILLARY TO FIGHT YOUR ENEMY. YOU HAVE TO FEEL BAD ONLY WHEN YOU DON'T HAVE ENOUGH ARTILLARY TO FIGHT YOUR ENEMY.&lt;/p&gt;
&lt;p&gt;SO CHEER THE C# TEAM FOR PROVIDING MORE FEATURES OR ALREADY EXISTING FEATURES IN OTHER LANGUAGES.&lt;/p&gt;
&lt;p&gt;HOPE ALL YOU GUYS HAVE A GOOD FUTURE.&lt;/p&gt;
&lt;p&gt;BYE FOR NOW.&lt;/p&gt;
&lt;p&gt;Your's,&lt;/p&gt;
&lt;p&gt;Sriram Naresh Akula (Working on C#)&lt;/p&gt;
&lt;p&gt;(Team Lead, Slash Source Technologies, Hyderabad, India)&lt;/p&gt;
&lt;p&gt;My contacts:&lt;/p&gt;
&lt;p&gt;+91-9989697948&lt;/p&gt;
&lt;p&gt;cybernaresh@atheist.com&lt;/p&gt;
&lt;p&gt;cybernaresh@yahoo.com&lt;/p&gt;
&lt;p&gt;cybernaresh@skype.com&lt;/p&gt;
&lt;p&gt;Visit my Homepage:&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://cybernaresh.spaces.live.com"&gt;http://cybernaresh.spaces.live.com&lt;/a&gt;&lt;/p&gt;
</description></item><item><title>re: New Features in C# 4.0 Paper, plus Feedback and Samples</title><link>http://blogs.msdn.com/charlie/archive/2008/11/04/new-features-in-c-4-0-paper-plus-feedback-and-samples.aspx#9203894</link><pubDate>Sat, 13 Dec 2008 02:15:10 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9203894</guid><dc:creator>Parveen</dc:creator><description>&lt;p&gt;Specifying the argument with name in method call is going to be an excellent advancement C#. Its like wish come true for, as I was dealing with a function in library where there were 3 Overloads for the same method and VisualStudio intellisense is nightmare if number of argument is more than 4-5. Kudos to C# team.&lt;/p&gt;
&lt;p&gt;On a different note&lt;/p&gt;
&lt;p&gt;I am in line with &amp;nbsp;what Neil said above. Optional parameter is like going back 4 steps from where C# started. &lt;/p&gt;
&lt;p&gt;VB language supported this feature and that time I thought it's just a backward compatibility support for VB6 developers in VB.Net. As in OOP overloading is way to go achieve the same. I have faced issues in VB.Net when you create WebService (Now WCF) methods with optional parameters. I consider using optional parameter is a bad practice even in VB.Net.&lt;/p&gt;
</description></item><item><title>re: New Features in C# 4.0 Paper, plus Feedback and Samples</title><link>http://blogs.msdn.com/charlie/archive/2008/11/04/new-features-in-c-4-0-paper-plus-feedback-and-samples.aspx#9242187</link><pubDate>Fri, 19 Dec 2008 17:49:09 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9242187</guid><dc:creator>Sidhartha Grover</dc:creator><description>&lt;p&gt;If I wanted to waste my time ever while developing a project I would use VB.NET with its horrible options like Optional Parameters. Then again, i someone likes using them they can use VB.NET and be happy with it. But this is the B@st@rdization of C#. C# is finally making its mark in history and wil get spoilt like this. Why dont some of the greatest languages with the C syntax like C++ and Java dont have optional parameters? I'm sure others would be feeling the same...&lt;/p&gt;
</description></item><item><title>re: New Features in C# 4.0 Paper, plus Feedback and Samples</title><link>http://blogs.msdn.com/charlie/archive/2008/11/04/new-features-in-c-4-0-paper-plus-feedback-and-samples.aspx#9246010</link><pubDate>Mon, 22 Dec 2008 03:49:57 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9246010</guid><dc:creator>bmx</dc:creator><description>&lt;p&gt;The new features seems really nice, but it's kind of hard for me to tell as the docks are posted in the docx format of all things. We are on the web theese days, and you guys seem rather clever, so I do hope to see a html vertion of your future documents :-) There are just no excuses to deliver documents in such an mediocre format, as not all of us has jumped on the Office bandwagon. The only alternative for me is the openoffice tools, and they are ...less then satisfactory... I find. &amp;nbsp;But keep up the good work on the framework guys! (but please up the ante on the docs ;-)&lt;/p&gt;
</description></item><item><title>re: New Features in C# 4.0 Paper, plus Feedback and Samples</title><link>http://blogs.msdn.com/charlie/archive/2008/11/04/new-features-in-c-4-0-paper-plus-feedback-and-samples.aspx#9258601</link><pubDate>Wed, 31 Dec 2008 18:54:37 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9258601</guid><dc:creator>K Ray</dc:creator><description>&lt;p&gt;For all of you ranting about optional parameters being new to C# v4.0... &amp;nbsp;Just remember that optional paramters have been in the language since v2.0 (although only used with custom attributes). &amp;nbsp;So this is not a new feature, just a new application of an existing feature. &amp;nbsp;&lt;/p&gt;
&lt;p&gt;I am not surprized about this change, nor the syntax. &amp;nbsp;It seems to be a logical improvement. &amp;nbsp;It also simplifies some problems with COM interoperability. &amp;nbsp;For some, this is a much needed improvement. &amp;nbsp;&lt;/p&gt;
</description></item><item><title>re: New Features in C# 4.0 Paper, plus Feedback and Samples</title><link>http://blogs.msdn.com/charlie/archive/2008/11/04/new-features-in-c-4-0-paper-plus-feedback-and-samples.aspx#9288603</link><pubDate>Wed, 07 Jan 2009 20:34:53 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9288603</guid><dc:creator>Wyatt Wong</dc:creator><description>&lt;p&gt;I love the optional and named parameter ! The optional parameter recalled the days when I use C++ and the named parameter have been available for years in VB and finally in C# ! The use of dynamic type in the example of COM (e.g. automate Excel) is a great feature, but it seems to be a bit LATE (well, I should say RATHER LATE) since on one hand, Microsoft had released the Office 2007 XML document file type and encourage people to use them instead of using COM to automate Word/Excel, but on the other hand the dynamic type for COM is telling the developers that - hey folks, you can now automate Excel through COM easily in C# 4.0 by making use of the dynamic type, and forget about the Office XML document type ! It seems to be a contradiction !! But nevertheless, I hope that IntelliSense will be provided when using the dynamic type to automate Word/Excel App !&lt;/p&gt;
&lt;p&gt;Last but not least, recalled the days that it was a total failure to Borland Delphi 4.0 and Borland C++ 4.0, I DO sincerely hope that the number 4.0 is NOT causing another failure to C# !&lt;/p&gt;
</description></item><item><title>re: New Features in C# 4.0 Paper, plus Feedback and Samples</title><link>http://blogs.msdn.com/charlie/archive/2008/11/04/new-features-in-c-4-0-paper-plus-feedback-and-samples.aspx#9483963</link><pubDate>Tue, 17 Mar 2009 18:51:50 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9483963</guid><dc:creator>mastermemorex</dc:creator><description>&lt;p&gt;I think that optional parameters could be a good improvement, because I frecuaently face that problem of having 20 constructors and 20 methods that do the same thing, but nevertheless it is not my highest priority. &lt;/p&gt;
&lt;p&gt;On the other hand dynamic type would be confusing, source of bugs and as far my main &amp;nbsp;concerns is performance, I will stay away of that. Furthermore, most of dynamic type issues can be more elegantly and efficiently imlemented if C# allows struct inheritance, field interfaces and operator constrains.&lt;/p&gt;
</description></item><item><title>re: New Features in C# 4.0 Paper, plus Feedback and Samples</title><link>http://blogs.msdn.com/charlie/archive/2008/11/04/new-features-in-c-4-0-paper-plus-feedback-and-samples.aspx#9899333</link><pubDate>Fri, 25 Sep 2009 07:44:04 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9899333</guid><dc:creator>ben</dc:creator><description>&lt;p&gt;Really miss Spec# non nullable reference types would remove ALL those if null checks for collections etc&lt;/p&gt;
</description></item></channel></rss>