Change all access modifiers by Refactor/Rename

Like the code below, What I want to do is change access modifier of Test method from “public” to “protected”, However it did not like the rename operator which will automatically rename the B.Test() after I rename the A.Test()

 

public class A
{
    public virtual void Test()
    {
    }
}

public class B : A
{
    public override void Test()
    {
    }
}
0
2 comments

Hello Zhoujiazhiwork, thank you for your question. Please try placing the cursor on the modifier or on the method name, call “Alt+Enter” and select the “To protected” item. Does this work for you?

0

Thanks, That's exactly what I need

0

Please sign in to leave a comment.