gpt4 book ai didi

c# - 我如何记录一个 c# dll

转载 作者:太空狗 更新时间:2023-10-29 18:14:27 25 4
gpt4 key购买 nike

我如何编写一个类,以便在其他项目中引用该 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/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com