rename class with file name in one step in Visual Studio

后端 未结 6 1796
醉酒成梦
醉酒成梦 2021-02-18 13:29

I am a long year Java programmer, but currently I code in C#. I am accustomed, that when I change filename, also the class name changes and vice versa. This doesn\'t work in my

6条回答
  •  广开言路
    2021-02-18 14:03

    Renaming a file works fine - it'll offer to change the code to match:

    enter image description here

    If you rename the class, then - indeed, this doesn't happen by default. There is no actual need for the two to match, note. But ultimately, rename is only an f2 away.

提交回复
热议问题