c# – XML注释标签:怎么看?

c# – XML注释标签:怎么看?,第1张

概述我使用Microsoft Visual Studio 2012. 当我将代码示例放入C#classes / methods的 XML注释中时,我想知道:引用我的程序集的用户将如何看到该代码示例? 我试图引用我自己的程序集,我找到的唯一方法是:查看assembly.xml文件. 我可以解决Visual Studio或其他任何东西来查看这些代码示例吗? 以下是我发表评论的内容: /// <summar 我使用Microsoft Visual Studio 2012.
当我将代码示例放入C#classes / methods的 XML注释中时,我想知道:引用我的程序集的用户将如何看到该代码示例?

我试图引用我自己的程序集,我找到的唯一方法是:查看assembly.xml文件.
我可以解决Visual Studio或其他任何东西来查看这些代码示例吗?

以下是我发表评论的内容:

/// <summary>/// This is my method example/// </summary>/// <example>/// <code>/// // Here is my code example. Call my method like this:/// const int a = 10;/// MethodExample(a);/// </code>/// </example>public static voID MethodExample(int parameter){}

这是我在intellisense中得到的:

这是我在对象浏览器中得到的:

这是我在assembly.xml文件中得到的:

我想得到的内容:请参阅对象浏览器和智能感知中的代码示例.

解决方法 许多XML注释标记仅作为其他标记的子元素出现在IntelliSense中.这些标记称为ChildCompletionList标记,它们是:c,代码,示例,列表,Listheader,para,paramref,另请参见.
/// <summary>/// MethodExample the function that does it all.../// <example>/// <code>/// <para/>// Here is my code example. Call my method like this:/// <para/>const int a = 10;/// <para/>MethodExample(a);/// </code>/// </example>/// </summary>
总结

以上是内存溢出为你收集整理的c# – XML注释标签:怎么看?全部内容,希望文章能够帮你解决c# – XML注释标签:怎么看?所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/langs/1244665.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-06-07
下一篇2022-06-07

发表评论

登录后才能评论

评论列表(0条)

    保存