当前位置:编程学习 > C#/ASP.NET >>

宏 注释模版 实现summary 的功能

        /// <summary>
        /// 
        /// </summary>
        /// <param name="a"></param>
        /// <returns></returns>


summary 能获取它下边的方法参数名 


  /*******************************************************************
     * * 函数名称:
     * * 功    能:
     * * 参    数:
     * * 返 回 值:
     * * 作    者:
     * * 日    期:2012年11月5日
     * *******************************************************************/

我用宏生成的注释模版 怎么获取方法的参数名?

代码:
 Sub AddFunComment()
        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
补充:.NET技术 ,  C#
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,