为Unity项目生成文档(一)
2014-09-03 17:23
148 查看
VS代码中使用Xml注释,并通过Sandcastle生成chm文档的文章,这几篇值得分享:
请重点看下面方法的xml注释:
生成chm文档后的截图
摘要:
展开详细文档信息:
使用.NET中的XML注释(一) -- XML注释标签讲解
使用.NET中的XML注释(二) -- 创建帮助文档入门篇
VS中的XML注释语法:
建议的文档注释标记(C# 编程指南)请重点看下面方法的xml注释:
[code]/// <summary>
/// 根据用户Id得到用户名.
/// <para>
/// 此处添加第二段Summary信息,在MSDN中很少使用.所以不推荐使用.
/// </para>
/// </summary>
/// <remarks>
/// 如果没有找到用户则返回null.<br/>
/// <paramref name="userId"/> 参数为正整数.<br/>
/// 用户Id模型属性定义参见<see cref="UserInfo.UserId"/><br/>
/// 相关方法:<seealso cref="UserBL.GetUserId"/>
/// </remarks>
/// <param name="userId">用户Id</param>
/// <returns>用户真实姓名</returns>
/// <example>
/// 返回用户id为100的用户真实姓名:
/// <code>
/// private string userName = string.Empty;
/// userName = UserBL.GetUserName(100);
/// </code>
/// 返回的用户名可能为null,使用时要先判断:<br/>
/// <c>if(userName!=null){...}</c>
/// </example>
/// <exception cref="System.ApplicationException">
/// 如果用户Id小于0则抛出此异常
/// </exception>
public static string GetUserName(long userId)
{
string result = string.Empty;
if (userId < 0)
{
throw new System.ApplicationException();
}
else if (userId == 0)
{
result = null;
}
else
{
result = "Robert";
}
return result;
}
生成chm文档后的截图
摘要:
展开详细文档信息:
相关文章推荐
- 为Unity项目生成文档(二)
- Sandcastle生成项目文档
- Sandcastle生成项目文档
- java_javadoc 生成项目文档(设置编码解决中文乱码问题)
- 将项目打包成jar与生成对应的api帮助文档(也就是注解)
- 如何利用XDE生成项目说明文档
- ant笔记-7.项目构建之运行测试、生成文档、项目打包、发布ftp
- 使用rebar构建工程、执行单元测试、自动生成项目文档
- DotNet 项目开发文档的自动生成和相关工具的使用
- MFC:“Debug Assertion Failed!” ——自动生成的单文档程序项目编译运行就有错误
- SQL Server 数据库文档生成工具开源项目【合作邀请】
- 使用Doxygen来自动化生成项目代码文档
- 脚本军火库:使用模板生成文档(2)生成Gradle项目
- eclipse根据C++项目组提供的WEBSERVICE的WSDL文档生成客户端,打成jar包,供spring项目使用
- 使用开源项目JExcelApi在Java环境中生成MS Excel文档
- .net项目文档生成工具使用
- .NET项目工程生成一份项目帮助文档chm--Sandcastle工具
- 用maven为项目生成javadoc文档
- Xcode配置Appledoc并生成项目文档