How can we generate getters and setters in Visual Studio?

后端 未结 16 2197
盖世英雄少女心
盖世英雄少女心 2020-12-07 07:46

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 pr

16条回答
  •  太阳男子
    2020-12-07 08:02

    In visual studio 2019, select your properties like this:

    Then press Ctrl+r Then press Ctrl+e

    A dialog will appear showing you the preview of the changes that are going to be done to your code. If everything looks good (which it mostly will), press OK.

提交回复
热议问题