visual-studio-2010getter-setterauto-generate

Can Visual Studio auto-generate properties?


Like in Eclipse for Java, where it can auto-generate getters and setters for class variables, can Visual Studio 2010 do this as well?


Solution

  • 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.