c# - "Automatically insert all named arguments"在方法调用站点,在代码中

标签 c# visual-studio resharper named-parameters

<分区>

说有一个方法,

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

有没有办法在调用站点将 M() 转换为 M(a: .., b: .., c: ..)

我正在使用 Visual Studio 2013(旗舰版) 2017 Professional 和 ReSharper 8 ReSharper 2018.1。使用其中任何一个的内置解决方案(或扩展,如果需要)将是合适的。

这类似于 Is there any tools to help me refactor a method call from using position-based to name-based parameters ,虽然我希望从没有参数开始;并在 4 年后问这个问题。

最佳答案

Resharper 可以为您做到这一点 https://www.jetbrains.com/help/resharper/Argument_Style.html

关于c# - "Automatically insert all named arguments"在方法调用站点,在代码中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29518933/

相关文章:

c# - 别名和点网类型和 c# 类型

c# - 如何将生成类的 resharpers 默认访问修饰符更改为 public 而不是 internal?

c# - SQL Server 相当于 Oracle 'byte'

c# - 枚举上的 JsonConverter 属性打破了 asp.net 核心模型绑定(bind)

c# - 只更改一次变量名

c# - Resharper 重构模式将局部变量赋值包装在 try catch 中

c# - 在 LINQ 中使用 PropertyInfo 对象查询集合

c# - Entity Framework 4.1 InverseProperty 属性

c++ - 包含 MFC 对象库时无法解析的外部符号

c - 为什么 strcpy 编译为文字?