我如何编写一个类,以便在其他项目中引用该 dll 的人可以看到属性和方法描述?
[Description("My age in years attribute")]
public int Age
{
get { return 0; }
set { }
}
不行,不行
/// <summary>
/// My age in years attribute
/// </summary>
public int Age
{
get { return 0; }
set { }
}
最佳答案
在 Visual Studio 中:
Project -> Properties -> Build -> Check "XML Documentation File".
有关详细信息,请参阅 XML Comments Let You Build Documentation Directly From Your Visual Studio .NET Source Files .
关于c# - 我如何记录一个 c# dll,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2193038/