|
by Eric Lippert via Fabulous Adventures In Coding on 5/19/2011 3:19:00 PM
(This is the fourth and final part of a series on the corner cases of optional arguments in C# 4; part three is here.) Last time we discussed how some people think that an optional argument generates a bunch of overloads that call each other. People also sometimes incorrectly think that void M(string format, bool b = false) { Console.WriteLine(format, b); } is actually a syntactic sugar for something morally like: void M(string format, bool? b){ bool realB = b ?? false; Cons
... [ read more ]
|
|