views:

21

answers:

1

Like in Eclipse for java, where it can auto-generate getters and setters for class variables, can Visual Studio 2010 do this as well? I can't find it anywhere....

+2  A: 

I usually type prop in the code editor and then press Tab twice. Another possibility is to right click on the private field and Refactor -> Encapsulate Field ... or Ctrl+R,E but the first method is more convenient for me.

Darin Dimitrov
wow that is cool i never knew that. it doesn't generate everything completely, but its a lot better template than i was working with.
Scott
Beat me to it. I don't have VS installed on this machine to double check ;)
ChrisF
But still, is there anything to just generate all public properties for each variable in the class similar to eclipse? or is this the only way...
Scott
@Scott, I am not aware of any.
Darin Dimitrov
hmm, okay. thanks!
Scott