[4.0] Named parameters. Anyone used the CTP yet?
I was curious about something from those that have or have tried the 2010 CTP. With the new named parameters feature, do you need to have the parameters in order when calling now or can they be in any order?
For example
Code:
private void MyMethod(string parameter1, int parameter2)
{
}
private void CallMyMethod()
{
MyMethod(parameter2: 1, parameter1: "Hey");
}
Just something I was curious about.
Re: [4.0] Named parameters. Anyone used the CTP yet?
They can be in any order.
However, if you have some unnamed parameters, then the unnamed parameters must precede the named parameters and be in order.
Re: [4.0] Named parameters. Anyone used the CTP yet?