I have a class A
in file B.cs
. Now I want to rename this class to match the file name (B
).
Is there a refactoring or context action in VS or ReSharper which automatically can do this renaming for me without typing in the new name matching file name?
Example
Before renaming:
File B.cs:
class A {}
After automatically renaming:
File B.cs:
class B{}
Update
The opposite (automatically rename file to match class name) is not an option because all these file renamings are implemented as DELETE+ADD. But then I would lose change history of that file in Perforce because all VS-Plug-ins for VS-Perforce-connection do not support move/add+move/delete actions for renaming.