How can we generate getters and setters in Visual Studio?

后端 未结 16 2274
盖世英雄少女心
盖世英雄少女心 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条回答
  •  旧时难觅i
    2020-12-07 08:19

    If you are using Visual Studio 2005 and up, you can create a setter/getter real fast using the insert snippet command.

    Right click on your code, click on Insert Snippet (Ctrl+K,X), and then choose "prop" from the list.

提交回复
热议问题