VS中为函数自动添加函数说明
来源:互联网 发布:淘宝折扣卷 编辑:程序博客网 时间:2024/05/21 19:38
步骤:
1、在记事本中编辑好类似下面的脚本代码:
01 Imports System02Imports EnvDTE03Imports EnvDTE8004Imports EnvDTE9005Imports EnvDTE90a06Imports EnvDTE10007Imports System.Diagnostics08 09Public Module ModuleTop10 Sub AddFunComment()11 Dim DocSel As EnvDTE.TextSelection12 DocSel = DTE.ActiveDocument.Selection13 DocSel.NewLine()14 DocSel.Text = "/*******************************************************************"15 DocSel.NewLine()16 DocSel.Text = "* 版权所有: "17 DocSel.NewLine()18 DocSel.Text = "* 类 名 称: "19 DocSel.NewLine()20 DocSel.Text = "* 功 能: "21 DocSel.NewLine()22 DocSel.Text = "* 参 数: "23 DocSel.NewLine()24 DocSel.Text = "* 返 回 值: "25 DocSel.NewLine()26 DocSel.Text = "* 作 者:XXXXX"27 DocSel.NewLine()28 DocSel.Text = "* 电子邮箱:XXXXXX@gmail.com"29 DocSel.NewLine()30 DocSel.Text = "* 创建日期: " + System.DateTime.Now.ToString()31 DocSel.NewLine()32 DocSel.Text = "*******************************************************************/"33 End Sub34 35End Module2、VS2010 IDE -> 工具 -> 宏 -> 新建宏项目,选择要保存的位置。然后将要上面的脚本复制进去,保存即可。
3、为你编写的宏绑定快捷键,VS2005 IDE -> 工具 -> 选项 -> 在左边列表中选择“键盘” -> 在右边的“显示命令包含”中,选择你创建宏-> 将光标定位到”按快捷键”处 -> 输入你想命名的快捷键,比如”Alt+C”,保存即可。
注:类内部注释
Imports SystemImports EnvDTEImports EnvDTE80Imports EnvDTE90Imports EnvDTE90aImports EnvDTE100Imports System.Diagnostics Public Module ModuleContent Sub AddFunComment() Dim DocSel As EnvDTE.TextSelection DocSel = DTE.ActiveDocument.Selection DocSel.NewLine() DocSel.NewLine() DocSel.Text = " #region<构造方法和析构方法>" DocSel.NewLine() DocSel.NewLine() DocSel.Text = "#endregion<构造方法和析构方法>" DocSel.NewLine() DocSel.NewLine() DocSel.NewLine() DocSel.Text = "#region<常量>" DocSel.NewLine() DocSel.NewLine() DocSel.Text = "#endregion<常量>" DocSel.NewLine() DocSel.NewLine() DocSel.NewLine() DocSel.Text = "#region<变量>" DocSel.NewLine() DocSel.NewLine() DocSel.Text = "#endregion<变量>" DocSel.NewLine() DocSel.NewLine() DocSel.NewLine() DocSel.Text = "#region<属性>" DocSel.NewLine() DocSel.NewLine() DocSel.Text = "#endregion<属性>" DocSel.NewLine() DocSel.NewLine() DocSel.NewLine() DocSel.Text = "#region<方法>" DocSel.NewLine() DocSel.NewLine() DocSel.Text = "#endregion<方法>" DocSel.NewLine() DocSel.NewLine() DocSel.NewLine() DocSel.Text = "#region<事件>" DocSel.NewLine() DocSel.NewLine() DocSel.Text = "#endregion<事件>" End Sub End Module其余步骤同上。
0 0
- VS中为函数自动添加函数说明
- VS 2005 为函数自动添加注释
- vs 为函数自动添加注释
- VS中为类,函数代码自动添加版权注释信息
- VS中为类,函数代码自动添加版权注释信息
- visual studio 自动添加函数说明。
- vs2005 为函数自动添加注释
- vs2005 为函数自动添加注释
- vs2005 为函数自动添加注释
- Java5中为XPath添加扩展函数
- 关于vs中scanf函数的一点说明
- 为类,函数代码自动添加版权注释信息
- vs环境中,使用VAssistX给函数添加注释
- VS中实现为类自动添加 个人版本信息 的方法
- VS中为程序文件自动添加版权信息注释的方法
- 懒人懒法——VS自动添加类、函数注释、版权信息
- 在CPP文件中自动添加函数注释的ADDIN
- 在CPP文件中自动添加函数注释的ADDIN
- parseInt() parseFloat() 和 toString()
- 图论之迪杰斯特拉算法
- Intellij IDEA该如何设置忽略部分类编译错误
- 1025. 反转链表 (25)
- mac 恢复出厂设置
- VS中为函数自动添加函数说明
- Volley源码分析二
- python 迭代器(iterator)和生成器(constructor)
- Java中发送Http请求Get、Post
- iOS不同模式返回根视图的方法
- myeclipse10合成svn
- IIS发布网站
- python http.client 进行 get 跟 post 访问
- logcat 类 控制打印