How to automatically change the signature of overridden methods when changing the signature of a virtual method using MSV2008 in C #?

I have a virtual method that is repeatedly overridden. I would like to add a parameter to all of these methods.

Is it possible to add a parameter to a virtual method and use a refactor to automatically update all overridden methods?

I know that with a refactor you can delete or change parameters, but I did not find Add.

+4
source share
1 answer

This functionality is not included in Visual Studio.

As mentioned in the commentary, I believe that you can get this by installing a plugin like Resharper (see the documentation for changing method signatures ).

If you do not want to install the plugin (for example, I), I use the Visual Studio function to search for all the links (by right-clicking on the function or using the Ctrl + K, R hotkey). This at least makes the execution easier: just double-click each search result and make changes.

0
source

Source: https://habr.com/ru/post/1438650/


All Articles