The answer for C# 4.0 doesn't work anymore. <-- (Sorry, this is wrong)
How can I use a TimeSpan as an optional parameter with default value?
public static Foo(string myString, TimeSpan maxWait = TimeSpan.FromSeconds(1))
{
// do something
}
With this code I get the error:
default parameter must be a compile-time constant