如何文档一个c#dll [英] How do I document a c# dll

查看:129
本文介绍了如何文档一个c#dll的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何编写一个类,以便在其他项目中引用该dll的人可以看到属性和方法描述?

How do I write a class so that property and method descriptions are visible to people referencing the dll in other projects?

    [Description("My age in years attribute")]
    public int Age
    {
        get { return 0; }
        set { }
    }

/ p>

doesn't work, neither does

    /// <summary>
    /// My age in years attribute
    /// </summary>
    public int Age
    {
        get { return 0; }
        set { }
    }


推荐答案

p>在Visual Studio中:

In Visual Studio:


项目 - >属性 - >构建 - >检查XML文档文件 $ b

Project -> Properties -> Build -> Check "XML Documentation File".

有关详细信息,请参阅 XML注释让您直接从Visual Studio .NET源文件构建文档

For further details, see XML Comments Let You Build Documentation Directly From Your Visual Studio .NET Source Files.

这篇关于如何文档一个c#dll的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆