C#快捷方式或简写的getter setter方法
问题描述:
有没有C#创建getter和setter一小段路
Is there a short way to create the getter and setter in c#?
public string fname {get; set;}
有手短,生成 {搞定;设置;}
答
雅型的道具并按下TAB? Visual Studio中有自动物业的片段。
yea type prop and press TAB. Visual Studio has a snippet for automatic property.
有关公共get和私人设置属性,可以使用 propg 并按下TAB键。
For property with public get and private set, you can use propg and press TAB.
有关完整的非自动属性,你可以使用 propfull 和按TAB键。
For complete non auto property you can use propfull and press TAB.