Irshad
Irshad

Reputation: 3131

Refactoring public methods to another class

I have a C# win form which serves as the GUI for my application. In the form code I've written all the public methods which used by the form events. Now I need to refactor all those public methods to another static class. I've studied 7 methods for refactoring built-in to VS2010 (See here). I also used the Extract interface method but, I still need to implement a interface method before initializing. My question is; Is there any facility in the Visual studio 2010 to do this? Like This

Upvotes: 3

Views: 3608

Answers (2)

TalentTuner
TalentTuner

Reputation: 17556

1 -Static classes can not implement interfaces so rule out this possibility.

2- You can not mock static class.

VS 2010 does not have Extract Class refactoring technique so you need to consider using ReSharper or other refatcoring tools

Upvotes: 0

John Saunders
John Saunders

Reputation: 161791

Visual Studio does not support the Extract Class refactoring. The latest versions of ReSharper do.

Upvotes: 2

Related Questions