Bulk rename of parameters of the same naming convention
Hi,
I have a lot of C# methods with parameter names as xParamName but I need to rename all of them to paramName. These namings have the same camelCase convention so I cannot tell R# to distinguish them by a new naming convention so the bulk rename isn't available to me. Renaming each parameter will lead to a huge time spent.
Is there a way to rename all of these params in bulk?
Please sign in to leave a comment.
Hello Rumo,
In general, there's no such functionality in ReSharper, please see the corresponding feature request - Option to remove prefix from entire code
But there's kind of workaround for your case, please add a new rule for parameter naming as illustrated on the screenshot.
Save changes and check that xParamName are squiggled and there's a suggestion to rename them into paramName.
Please let me know how it works for you.