How can we generate getters and setters in Visual Studio?

后端 未结 16 2209
盖世英雄少女心
盖世英雄少女心 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:04

    I don't have Visual Studio installed on my machine anymore (and I'm using Linux), but I do remember that there was an wizard hidden somewhere inside one of the menus that gave access to a class builder.

    With this wizard, you could define all your classes' details, including methods and attributes. If I remember well, there was an option through which you could ask Visual Studio to create the setters and getters automatically for you.

    I know it's quite vague, but check it out and you might find it.

提交回复
热议问题