|
-
Apr 9th, 2009, 08:04 PM
#1
[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.
-
Apr 10th, 2009, 12:43 AM
#2
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.
-
Apr 10th, 2009, 07:14 AM
#3
Re: [4.0] Named parameters. Anyone used the CTP yet?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|