青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品

C++ Programmer's Cookbook

{C++ 基礎} {C++ 高級} {C#界面,C++核心算法} {設計模式} {C#基礎}

XML Comments in C#

Author: James Foster Date Posted: 09/02/2001 .NET Version: 1.0.3705
Many of you have heard of JavaDoc, a feature of Java that automatically generates HTML documentation for your code. C#, and the C# compiler, is capable of a similar function, yet produces XML instead of directly producing HTML. This makes the documentation much more flexible.

Commenting Syntax
To use the XML commenting features of C#, you begin by commenting your source code using the special comment syntax, /// (three slashes). After the slashes you use one of the predefined tags for documentation comments, or embed your own. Your custom xml tags will carry over into the result XML documentation.

Predefined TagUsed for
<c>a way to indicate that text within a description should be marked as code
<code>a way to indicate multiple lines as code
<example>lets you specify an example of how to use a method or other library member
<exception>lets you document an exception class
<include>lets you refer to comments in another file, using XPath syntax, that describe the types and members in your source code.
<list>Used to insert a list into the documentation file
<para>Used to insert a paragraph into the documentation file
<param>Describes a parameter
<paramref>gives you a way to indicate that a word is a parameter
<permission>lets you document access permissions
<remarks>where you can specify overview information about the type
<returns>describe the return value of a method
<see>lets you specify a link
<seealso>lets you specify the text that you might want to appear in a See Also section
<summary>used for a general description
<value>lets you describe a property
Example
The following example adds comments to our introductory HelloWorld console application.
using System;

namespace HelloWorld
{
????/// <summary>
????/// Sample Hello World in C#
????/// </summary>
????publicclass HelloWorld
????{
????????/// <summary>
????????/// Console Application Entry Point
????????/// <param name="args">Command Line Arguments</param>
????????/// <returns>Status code of 0 on successful run</returns>
????????/// </summary>
????????publicstaticint Main(string[]args)
????????{
????????????System.Console.WriteLine("HelloWorld");
????????????stringname= System.Console.ReadLine();

????????????return(0);
????????}
????}
}

To get the resulting XML Documentation file, we call the csc compiler with the /doc option.

csc /doc:HelloWorld.xml helloworld.cs 或修改工程的property.build.output.xmldocument.(在2005中)


HTML Web Pages
You may be asking yourself: how do I get nicely formatted web pages? Well, you could write your own XSL to transform the XML documentation file, or you could use Visual Studio.NET. By using the Tools -> Build Comment Web Pages option, you can get a set of html files detailing your entire project or solution. Here is a screen shot by building web pages for our HelloWorld example:


But if you want to create easy-to-use, helpful, cross-referenced and attractive documentation, then I can strongly recommend the free, open source tool NDoc. The screenshot below is taken from a compiled help file produced from NDoc and is an example of the quality it can produce.



可以把xml制作chm的工具
NANT? 下載:http://nant.sourceforge.net/
NDOC? 下載:http://ndoc.sourceforge.net/

posted on 2006-04-13 14:02 夢在天涯 閱讀(836) 評論(1)  編輯 收藏 引用 所屬分類: C#/.NET

評論

# re: XML Comments in C# 2006-04-30 16:25 夢在天涯

很好用的啊,但是好像沒有最新的支持.net 2.0的啊!  回復  更多評論   

公告

EMail:itech001#126.com

導航

統計

  • 隨筆 - 461
  • 文章 - 4
  • 評論 - 746
  • 引用 - 0

常用鏈接

隨筆分類

隨筆檔案

收藏夾

Blogs

c#(csharp)

C++(cpp)

Enlish

Forums(bbs)

My self

Often go

Useful Webs

Xml/Uml/html

搜索

  •  

積分與排名

  • 積分 - 1811733
  • 排名 - 5

最新評論

閱讀排行榜

青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品
  • <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
      <noscript id="pjuwb"></noscript>
            <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
              <dd id="pjuwb"></dd>
              <abbr id="pjuwb"></abbr>
              亚洲一区二区在线免费观看| 午夜一区不卡| 亚洲国产经典视频| 亚洲成人在线视频播放 | 亚洲电影免费在线观看| 亚洲人成网站色ww在线| 日韩视频免费观看| 亚洲欧美一区二区激情| 久久综合网络一区二区| 亚洲精品小视频在线观看| 国产精品99久久久久久久vr| 性娇小13――14欧美| 免费av成人在线| 国产精品v日韩精品v欧美精品网站| 国产精品私房写真福利视频| 伊人久久大香线| 一区二区日韩伦理片| 欧美在线视频观看| 亚洲黄色在线视频| 亚洲欧美国产va在线影院| 另类图片国产| 国产精品黄色在线观看| 在线不卡中文字幕| 亚洲在线1234| 欧美激情偷拍| 亚洲欧美日韩国产中文在线| 欧美成人精品一区二区| 国产亚洲精品久久久久动| 日韩亚洲精品视频| 久久亚洲一区二区| 亚洲一区二区三区四区视频| 美女福利精品视频| 国产在线日韩| 亚洲欧洲99久久| 亚洲日本va在线观看| 久久人人爽人人爽爽久久| 国产精品美女久久| 99亚洲伊人久久精品影院红桃| 久久综合中文字幕| 午夜在线视频一区二区区别| 欧美日韩亚洲不卡| 亚洲精选久久| 亚洲第一在线综合在线| 久久久精品国产免大香伊| 国产女主播在线一区二区| 亚洲网站视频福利| 亚洲日本欧美| 欧美激情一二区| 亚洲国产成人一区| 蜜臀av性久久久久蜜臀aⅴ四虎| 亚洲欧美在线另类| 国产精品日韩电影| 午夜精品一区二区在线观看| 夜夜嗨av一区二区三区中文字幕 | 99精品久久久| 欧美精品精品一区| 99国产精品视频免费观看| 亚洲黄色天堂| 欧美国产日韩一区| 一本久久a久久精品亚洲| 欧美激情国产日韩| 男人的天堂亚洲| 亚洲国产一区二区三区青草影视| 免费成人av在线| 久久综合久久综合九色| 亚洲大片av| 亚洲国内精品| 欧美日韩综合久久| 亚洲一区国产一区| 亚洲女爱视频在线| 国产综合精品一区| 毛片基地黄久久久久久天堂| 久久香蕉国产线看观看网| 亚洲高清自拍| 亚洲欧洲精品成人久久奇米网| 欧美成人自拍视频| 亚洲尤物在线视频观看| 午夜精品在线| 亚洲福利国产| 日韩视频在线一区二区| 国产精品一区二区男女羞羞无遮挡| 香蕉久久a毛片| 久久久亚洲高清| av成人福利| 亚洲欧美日韩成人高清在线一区| 好吊日精品视频| 最新亚洲视频| 国产一区二区0| 亚洲黄色一区二区三区| 国产精品国产a| 毛片av中文字幕一区二区| 欧美日本精品| 久久久久久综合| 欧美日韩精品综合| 久久久久成人精品免费播放动漫| 嫩模写真一区二区三区三州| 亚洲综合清纯丝袜自拍| 久久国产福利| 亚洲欧美国产77777| 久久夜色精品国产欧美乱极品| 亚洲深夜影院| 美日韩丰满少妇在线观看| 欧美在线视频一区二区三区| 欧美极品影院| 美女尤物久久精品| 欧美日韩在线影院| 欧美国产日韩a欧美在线观看| 国产精品久久久久久久一区探花| 蜜臀a∨国产成人精品| 国产酒店精品激情| 一区二区免费在线播放| 亚洲激情视频网| 久久国产直播| 欧美一区二区三区免费观看视频| 米奇777超碰欧美日韩亚洲| 久久国产欧美日韩精品| 欧美日韩在线大尺度| 亚洲承认在线| 一区在线播放| 欧美一区二区三区视频免费播放| 亚洲一区二区黄色| 欧美日韩一区二区视频在线观看 | 亚洲精品专区| 亚洲精品视频在线观看免费| 久久久久久久久伊人| 久久成人精品无人区| 国产精品嫩草影院一区二区| 亚洲美女黄色片| 一本久久精品一区二区| 欧美精品激情| 日韩性生活视频| 99视频有精品| 欧美日韩www| 99在线精品视频| 亚洲视频精选| 欧美午夜片在线观看| 这里只有精品视频在线| 亚洲一区日韩| 国产精品美女黄网| 亚洲欧美成人在线| 久久精品日产第一区二区| 国产日韩欧美在线看| 欧美在线视频免费播放| 久久久久久成人| 亚洲成色999久久网站| 猫咪成人在线观看| 亚洲韩国精品一区| 一区二区三区|亚洲午夜| 欧美视频日韩视频在线观看| 这里只有精品在线播放| 久久成人免费网| 在线观看欧美日韩| 欧美黄色网络| 午夜激情综合网| 久久中文久久字幕| 亚洲精品一品区二品区三品区| 欧美美女bb生活片| 亚洲性视频h| 久久综合色8888| 艳妇臀荡乳欲伦亚洲一区| 国产精品三上| 久久天天躁狠狠躁夜夜爽蜜月| 亚洲国产精品精华液2区45 | 国产精品免费看久久久香蕉| 欧美一区亚洲| 亚洲欧洲精品一区二区三区| 亚洲欧美日产图| 亚洲高清av在线| 国产精品美腿一区在线看 | 一区二区精品在线| 久久午夜色播影院免费高清| 亚洲精品中文字幕在线观看| 国产精品日韩一区二区| 老司机久久99久久精品播放免费| 亚洲精品欧美极品| 久久野战av| 亚洲一级免费视频| 亚洲激情偷拍| 国产一区美女| 欧美三日本三级少妇三2023| 久久精品首页| 亚洲欧美日韩国产精品| 亚洲黄色一区| 蜜桃伊人久久| 久久久久久久久久码影片| 亚洲伦理一区| 依依成人综合视频| 国产欧美一区二区精品性 | 久久视频国产精品免费视频在线| 一本久道久久综合狠狠爱| 女人香蕉久久**毛片精品| 欧美一区三区二区在线观看| 99在线|亚洲一区二区| 亚洲第一网站| 黄色在线成人| 国产无一区二区| 国产麻豆日韩| 国产精品视频男人的天堂| 欧美视频日韩视频| 欧美日韩免费高清一区色橹橹|