Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create an interface out of a class easily?

I have a class which has 10 methods. What i want is to create an interface of that class, i.e the interface will contain only the signature of those 10 methods.

Can it be done easily in .NET using Visual studio?

I am asking this question because I am changing the architecture of my project and for every class present in my project i need an interface.

like image 776
Deviprasad Das Avatar asked Feb 22 '23 04:02

Deviprasad Das


1 Answers

If you are using VS 2010 you can do this by just going to the Refractor Menu and click Extract Interface, you can also use the key board short cut Ctrl+R, I

like image 95
Vamsi Avatar answered Mar 07 '23 08:03

Vamsi