Add a description for a property

前端 未结 2 2100
长发绾君心
长发绾君心 2021-02-19 18:44

How do I add a text description for my property?

\"alt

My code :

private bool _Space         


        
2条回答
  •  醉梦人生
    2021-02-19 19:02

    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; }
    

提交回复
热议问题