Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Automatically insert all named arguments" at method call-site, in code [closed]

Say there is a method,

void M(int a, int b, int c /* and many more */)

Is there a way to transform M() to M(a: .., b: .., c: ..) at the call-site?

I am using Visual Studio 2013 (Ultimate) 2017 Professional with ReSharper 8 ReSharper 2018.1. A built-in solution (or extension if such is required) that utilized either would be suitable.

This is similar to Is there any tools to help me refactor a method call from using position-based to name-based parameters, although I expect to start with no arguments; and am asking the question 4 years later.

like image 262
user2864740 Avatar asked Apr 08 '15 15:04

user2864740


1 Answers

Resharper can do this for you https://www.jetbrains.com/help/resharper/Argument_Style.html

like image 76
Alexandre Avatar answered Sep 17 '22 12:09

Alexandre