Vs2010在C#类文件头部添加文件注释的方法


步骤:

1.VS2010 中找到(安装盘符以C盘为例)

32位操作系统路径:C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\ItemTemplatesCache\CSharp\Code\2052\Class.zip

64位操作系统路径:C:\Program Files(X86)\Microsoft Visual Studio 10.0\Common7\IDE\ItemTemplatesCache\CSharp\Code\2052\Class.zip

2.在Class.cs 文件中添加如下代码。

/*

* ==============================================================================
*
* Filename: $safeitemname$
* Description: 
*
* Version: 1.0
* Created: $time$
* Compiler: Visual Studio 2010
*
* Author: Your name
* Company: Your company name
*
* ==============================================================================
*/

 

或者:

 

   /*************************************************************************************
     * CLR版本:       $clrversion$
     * 类 名 称:       $itemname$
     * 机器名称:       $machinename$
     * 命名空间:       $rootnamespace$
     * 文 件 名:       $safeitemname$
     * 创建时间:       $time$
     * 作    者:          xxx
     * 说   明:。。。。。
     * 修改时间:
     * 修 改 人:
    *************************************************************************************/

3.这样在新建c#类文件时就会自动添加注释说明信息了。


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM