In addition to the answer by Kim:
Before v.4.0, the only way of getting the effect of optional parameters with default was method overloading.
Here is how:
const int DefaultB = 13;
void MethodWithOptionalArguments(int a, int b, string c) { }
void MethodWithOptionalArguments(int a, int b ) {
MethodWithOptionalArguments(a, b, string.Empty);
}
void MethodWithOptionalArguments(int a) {
MethodWithOptionalArguments(a, DefaultB, string.Empty);
}
—SA