Easy way to generate Getters and Setters in Visual Studio
问题 Is there a way to generate getters and setters in Visual Studio? I'm trying with Alt + R , F and i get this: public String Denomination { get { return denomination; } set { denomination = value; } } and what I want is this: public String getDenomination() { return Denomination; } public void setDenomination(String Denomination) { this.Denomination = Denomination; } is there a way to do that? 回答1: You can use the prop code snippet to create automatic properties. Type prop , and press Tab . You