zoukankan      html  css  js  c++  java
  • VS2008使用宏记录来实现自动增加注释信息

    不管是做什么项目,代码里面的注释是必不可少的,其实一个好的程序员大部分的时间都是在给代码写注释,但是相同的注释不停的写也是件比较麻烦的事儿,在VS2008里面通过宏可以记录下注释信息,产生一个注释文件,每次需要的时候直接增加到类文件里面即可,方法如下:

     Sub AddComment()
            Dim DocSel As EnvDTE.TextSelection
            DocSel = DTE.ActiveDocument.Selection
            DocSel.NewLine()
            DocSel.Text = "/*******************************************************************"
            DocSel.NewLine()
            DocSel.Text = "* 函数名称:"
            DocSel.NewLine()
            DocSel.Text = "* 功    能:"
            DocSel.NewLine()
            DocSel.Text = "* 作    者: "
            DocSel.NewLine()
            DocSel.Text = "* 博    客: "
            DocSel.NewLine()
            DocSel.Text = "* 电子邮箱: "
            DocSel.NewLine()
            DocSel.Text = "* 日    期:" + System.DateTime.Now.ToLongDateString()
            DocSel.NewLine()
            DocSel.Text = "*******************************************************************/"
        End Sub
查看全文
  • 相关阅读:
    【咖啡の设备】便携式冰滴壶——Dripo 使用体验 Experience Report of Ice Drip Coffee Maker——Dripo
    【异常记录(八)】 This operation requires IIS integrated pipeline mode.
    【异常记录(七)】MVC:从客户端中检测到有潜在危险的 Request.Form 值 的解决方法 [转] A potentially dangerous Request.Form value was detected from the client
    SQL优化:清理生产环境中已失效字段基本步骤 SQL optimization: basic steps to clean up invalid fields in production environments
    [转] sql server 跨数据库调用存储过程 SQL server calls stored procedures cross-databases
    获取lambda表达式类型,获取attributes是注意事项
    [笔记] SQL性能优化
    MSSQL 重建索引(在线重建、控制最大处理器数 、MAXDOP )
    [笔记] SQL性能优化
    [笔记] SQL性能优化
  • 原文地址:https://www.cnblogs.com/allen0118/p/2721561.html
  • Copyright © 2011-2022 走看看