C# – How to we generate getters and setters in Visual Studio

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

Best Answer

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