How to refactor the visibility of an abstract member?

I want to change the visibility of an abstract member, from public to protected. All overrides should be changed too.

How can I do this by ReSharper?


Comment actions Permalink

It seems no one has such problem,


Comment actions Permalink

Reshaper can't do this for you. The moment you alter the accessibility of a method that is used OUTSIDE the class, you would create an error.
To protect user from themselfs, Resharper refused to alter code that doesn't compile.

If the method is only used inside your class, that just change one method, you the copy (ctrl-C) the 'protected' keyword and paste it over the the public statements of the remaining overloaded methods.
To be safe, recompile the solution and check for compile errors. If none found, refactory completed..

Hope this helps,

Comment actions Permalink

Thank you for your information, :)


Please sign in to leave a comment.