Search code examples
c#visual-studiosettergetter

How can we generate getters and setters in Visual Studio?


By "generate", I mean auto-generation of the code necessary for a particular selected (set of) variable(s).

But any more explicit explication or comment on good practice is welcome.


Solution

  • Rather than using Ctrl + K, X you can also just type prop and then hit Tab twice.