views:

21

answers:

1

I have like 10 private members in my class, and I was hoping vs.net could create public properties from them but can't seem to find that option in VS.NET 2008.

Is there a feature for this?

+1  A: 

In VS, select the field you want to create a property for. In the Refactor menu select Encapsulate Field... and in the Encapsulate Field dialog which appears enter the name for the property and click OK.

You'll have to do this for each field, but it's pretty quick (especially if you use shortcut keys).

Jay Riggs
thanks, that's at least better than doing 100% manual. Very surprised they don't have this out of the box. guess it makes jetbrains richer!
Blankman
BTW, what is the shortcut key to open encapsulate field window?
Blankman
On my machine Control+R, E. You can also show the shortcuts on the tooltips by selecting Tools > Customize and checking 'Show shortcut keys in Screentips'
Jay Riggs
yeah mine is the same, thanks!
Blankman