如何为我的属性(property)添加文字说明?
我的代码:
private bool _SpaceKey;
public bool SpaceKey
{
get
{
return _SpaceKey;
}
set
{
_SpaceKey = value;
}
}
最佳答案
[Description("This is the description for SpaceKey")]
public bool SpaceKey { get; set; }
您还可以使用 Category Attribute 来指定属性的类别:
[Category("Misc")]
[Description("This is the description for SpaceKey")]
public bool SpaceKey { get; set; }
关于c# - 添加属性描述,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/3832725/