Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to refactor to a different class in visual studio

I can refactor a big code to a new method which automatically sets the parameters, return type, if static or not etc in the same class. Is there a way that I can move the code to a new function in a different class if I could specify the class somehow? May be I'm missing something silly.

like image 684
nawfal Avatar asked Nov 14 '25 11:11

nawfal


1 Answers

In VIsual Studio there is no possibility to move methods between classes. But if you use ReSharper from JetBrains, you can move static methods between classes with Move To Another Type command.

like image 195
Espen Burud Avatar answered Nov 17 '25 10:11

Espen Burud