How to use default parameters in C#?
At present, you have to overload the method:
void cookEgg(bool hardBoiled) { ... }
void cookEgg() { cookEgg(true); }
C# 4.0 will add optional arguments - you will be able to write code exactly as in your original sample, and it will work as you'd expect.
Default parameters are supported in C# 4 (Visual Studio 2010).
http://msdn.microsoft.com/en-us/library/dd264739(VS.100).aspx