Do you know how easy it is to extract an interface out of a class? It's very easy and effective with Visual Studio. Let's see the following steps:
- Hover on the concrete class; you will see a bulb at the left side.
- Click on that to open a drop-down menu. Refer to the following screenshot:
- Select the Extract Interface.
- A modal pops up which also lists the public members of the class. See the following screenshot:
- Hit OK. It will create the interface for you.
There is another ...