Shortcut to create properties in Visual Studio?

后端 未结 16 1925
暖寄归人
暖寄归人 2020-12-02 03:42

I have seen some people creating properties in C# really fast, but how did they do it?

What shortcuts are available in Visual Studio (currently using Visual Stu

16条回答
  •  一个人的身影
    2020-12-02 04:06

    When you write in Visual Studio,

    public ServiceTypesEnum Type { get; set; }
    public string TypeString { get { return this.Type.ToString();}}
    

    ReSharper will keep suggesting to convert it to:

    public string TypeString => Type.ToString();
    

提交回复
热议问题