I have 60 or so classes in a folder and I created a base class for those classes to inherit from.
Is there any automatic way to do this other than copy&paste method in Visual Studio?
I hoped resharper has some functionality for that but can’t find one.
You can automate the cut/paste process by using the search and replace feature of Visual Studio to find all declarations, and replace them with declarations that inherit from your base class.
public class {:i}in the “Find what” boxpublic class \1 : MyBaseClassin the “Replace with:” boxKeep clicking
[Find Next]to find the next occurrence of a class declaration. If the search highlights one of the sixty declarations that you want to modify, click[Replace], otherwise keep clicking[Find Next].