Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I create auto-implemented properties in the VS class designer

I'm using the class designer in Visual Studio 2008 and when I add properties to my classes they are created with an empty setter and a getter that throws a NotImplementedException. In the properties window there's an option called "Auto-Implemented" which is always greye out. Is there a way to change the settings for this so by default new properties will be auto-implemented or some way to turn this option on so I don't have to keep editing the code each time I add in a new property?

like image 733
Brian Surowiec Avatar asked Feb 05 '09 22:02

Brian Surowiec


1 Answers

AFAIK, you can't. I asked this at Barcelona a year or so ago - I don't think anything has changed. Basically, as I understand it, this is done directly (not via an editable snippet).

like image 170
Marc Gravell Avatar answered Oct 11 '22 14:10

Marc Gravell