[1654] Change signature requires but doesn't use default values

When using Refactor -> Change Signatures, the dialog requires the use of
a default value for value based parameters and offers no way to skip
entering that value.

However, when the default values are entered, ReSharper doesn't use them
in the refactored signature.

2 comments
Comment actions Permalink

The default values are not there for use as C#4-style default argument values at the method definition.  They get used as placeholders in all the method *CALLS* which need to have something provided for the new arguments.

Funny enough, I found that confusing to start with, and that was long before C#4 came along with a different meaning for 'default'.

0
Comment actions Permalink

Will,

When you explain it that way it makes perfect sense...I actually
remember that now, but I guess I got all excited about C#4's default
arguments and forgot.

Thanks

Will Dean wrote:

The default values are not there for use as C#4-style default argument values at the method definition.  They get used as placeholders in all the method CALLS which need to have something provided for the new arguments.

>

Funny enough, I found that confusing to start with, and that was long before C#4 came along with a different meaning for 'default'.

>

---
Original message URL: http://www.jetbrains.net/devnet/message/5260383#5260383
 

0

Please sign in to leave a comment.