Add a description for a property

前端 未结 3 2124
轮回少年
轮回少年 2021-02-19 18:56

How do I add a text description for my property?

\"alt

My code :

private bool _Space         


        
3条回答
  •  感情败类
    2021-02-19 19:25

    Have a look at the Description Attribute:

    [Description("This is the description for SpaceKey")]
    public bool SpaceKey { get; set; }
    

    You can additionally use the Category Attribute to specify the category of the property:

    [Category("Misc")]
    [Description("This is the description for SpaceKey")]
    public bool SpaceKey { get; set; }
    

提交回复
热议问题