R# doesn't suggest adding the new parameter to the called method

Answered

I have a method with two parameters. In the caller I typed a third parameter (extractFullName in this case) and R# doesn't suggest adding it to the called method. There are in total 9 suggestions and none of them is about adding the new parameter to the called method.
This seems to be a common refactoring or am I doing it wrong? Using R# 2021.1.2.
I reported a similar problem 11 years ago.  Even the overload suggestion mentioned in the old post is not there.


3 comments
Comment actions Permalink

Abdu Bukres, thank you for your question. Please first declare (and initialize) a variable or create a parameter (or whatever), and then you will be able to add a new parameter to the method that was called.

0
Comment actions Permalink

OK that makes sense. Thanks.. I am trying to add two new parameters to a method and the suggestion I got was to create a new overload method only. It seems R# would give the add parameter suggestion only if I add one parameter only. Not a real issue. I can repeat the process twice.

0
Comment actions Permalink

Abdu Bukres, thanks for the reply! You may find it more convenient to use Change Signature refactoring, please take a look at https://www.jetbrains.com/help/resharper/Refactorings__Change_Signature.html

Please let me know if you have any questions.

0

Please sign in to leave a comment.