是否可以选择一个方法的所有参数并要求 ReSharper 从这些参数创建一个类作为“方法参数对象”?
最佳答案
ReSharper 支持命令 Extract Class From Parameters :
The Extract Class From Parameters refactoring allows you to quickly create a new class or structure using (some of) the parameters of a given method. ReSharper analyses the selected method and detects the variables that can be converted into members. After extraction, the new class is created with the necessary fields generated from the selected method's parameters.
调用它:
要为
参数 '
关于.net - 如何在几秒钟内使用 ReSharper 创建方法参数对象?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4067960/