W
Water Cooler v2
So you have optional parameters for functions/methods in Visual Basic
..NET, but not in C#?
..NET, but not in C#?
Mark said:correct - optional parameters are not part of the C# language specification,
however the same effect can be achieved by Method overloading for most cases.
Clive Dixon said:Note that you can create methods with optional parameters in C# using
OptionalAttribute, you just can't consume them from C# (though you can
from VB) and I don't think there's any way of specifying the default value
for the optional argument which is a major limitation anyway - you will
just get the default value for the type I think.