欢迎访问 生活随笔!

尊龙游戏旗舰厅官网

当前位置: 尊龙游戏旗舰厅官网 > 编程语言 > asp.net >内容正文

asp.net

sandcastle是微软提供的一个根据xml注释和dll文件生成帮助文件的工具 -尊龙游戏旗舰厅官网

发布时间:2025/1/21 asp.net 21 豆豆
尊龙游戏旗舰厅官网 收集整理的这篇文章主要介绍了 sandcastle是微软提供的一个根据xml注释和dll文件生成帮助文件的工具 小编觉得挺不错的,现在分享给大家,帮大家做个参考.

2019独角兽企业重金招聘python工程师标准>>>

      sandcastle是微软提供的一个根据xml注释和dll文件生成帮助文件的工具,目前是在codeplex上的一个开源项目,可以去这里下载:sandcatle 项目 sandcastle 本身是一个console的程序,为了方便使用,我们可以使用他的gui版本:sandcastle help file builder。

第一步,为你写的代码添加xml注释

我们创建一个简单的classlibrary1项目最为示范:

using system; using system.collections.generic; using system.text; namespace classlibrary1 {/// /// a sample class to show something using sandcastle/// public class sampleclass{private string _propertyvalue;/// /// gets or sets the property value./// /// the property value.public string property{get{return _propertyvalue;}set{_propertyvalue = value;}}/// /// determines whether the property is null./// /// /// true if property is null; otherwise, false./// public bool ispropertynull(){bool result = false;if (this.property == null){result = true;}return result;}/// /// determines whether the property is null./// /// /// true if property is empty; otherwise, false./// /// /// this example shows how you might use this method:/// /// /// sampleclass sample = new sampleclass();/// /// if (sample.ispropertyempty())/// {/// console.writeline("the property is empty");/// }/// else/// {/// console.writeline("the property contains value " sample.property);/// }/// /// public bool ispropertyempty(){bool result = this.ispropertynull();if (!result){result = (property.trim().length == 0);} return result;}}}

代码很简单,注意其中的xml注释。

打开项目的属性,在“build”选项中,确保“xml documentation file:”被选中了。

第二步,编译这个项目,你会看到生成的dll文件和xml文件:

第三步,打开 sandcastle help file builder

第四步,修改设置

在项目的属性窗口,你可以根据需要修改一些设置。

第五步,生成文档




转载于:https://my.oschina.net/lichaoqiang/blog/492307

总结

以上是尊龙游戏旗舰厅官网为你收集整理的sandcastle是微软提供的一个根据xml注释和dll文件生成帮助文件的工具的全部内容,希望文章能够帮你解决所遇到的问题。

如果觉得尊龙游戏旗舰厅官网网站内容还不错,欢迎将尊龙游戏旗舰厅官网推荐给好友。

网站地图