29 November 2011

Default parameters

How disappointing! I've just started to dip a toe into C# default parameters. And they have to be compile-time constants. Sure, it makes a lot of sense, but how about allowing static readonly properties as well?

All I want is this:

// Not too much to ask for?
void MyMethod(Guid someId = Guid.Empty)

No comments: