Reputation: 17729
I am looking for a refactoring plugin which specifically has the ability to take a declaration like this:
Dim myVar as MyType
or
Private MyVar as MyType
and turn it into this:
Private _myVar as MyType
Private Property MyVar as MyType
Get
return _myVar
End Get
Set (ByVal value as MyType)
_myVar = value
End Set
End Property
My examples are in VB however C# support would be greatly appreciated as well.
I am familiar with the VSS Template for Properties, however using that often feels slower than just typing.
Thanks in advance
Upvotes: 0
Views: 355
Reputation: 28617
For free you can use the express edition of CodeRush to do this: Get it here. You want the "Encapsulate Field" refactor.
For cold, hard, cash the full version of CodeRush or Resharper will do this and much more. (I'd imagine there are other tools out there too, but this are the two I have experience with)
Upvotes: 4