0

我在 Visual Studio 2017 上使用上述文档工具。

我可以访问 GhostDoc 选项 > 规则 > 属性模板并自定义代码。我有一个像这样的财产;

[Display(Name="Text here")]
[Required]
public int CompanyId {get;set;}

我想达到“必需”和“显示名称”属性并总结使用它们。有没有办法实现它?

谢谢你。

4

1 回答 1

1

有关如何在模板中使用属性名称的信息,请参阅https://support.submain.com/community/a75/how-to-reference-an-attribute-on-a-method-or-property.aspx 。属性值在 ATM 上不可用,但即将推出。

于 2019-03-23T23:46:05.237 回答