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

前端 未结 4 790
悲&欢浪女
悲&欢浪女 2021-01-18 04:06

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 NotImplementedEx

4条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-18 04:11

    You can create field, and encapsulate it(Refactor->Encapsulate field).
    This can help for simple properties.

提交回复
热议问题