Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何使用快捷键在visual studio中插入数据成员的get set code?
我认为这是一些标签。
尝试键入“prop”并按两次TAB,您会看到一些很酷的东西。(至少对我来说)
要获取 getter 和 setter 方法的完整属性,请键入“propfull”tab两次。这将生成私有和公共字段和属性,如下所示
private int myVar; public int MyProperty { get { return myVar; } set { myVar = value; } }