C#为类文件自动添加头注释

原文地址:http://blog.csdn.net/woaizard100/article/details/7008030

1.   VS2010 中找到安装盘符(本人安装目录在C盘,所以以C盘为例)

2.打开目录C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\ItemTemplatesCache\CSharp\Code\2052\,找到Class.zip文件,双击进入

3.找到Class.cs文件打开,其原有结构为

using System;
using System.Collections.Generic;
$if$ ($targetframeworkversion$ >= 3.5)using System.Linq;
$endif$using System.Text;

namespace $rootnamespace$
{
	class $safeitemrootname$
	{
	}
}
4.在其添加添加以下内容

 /*************************************************************************************
     * CLR版本:       $clrversion$
     * 类 名 称:       $itemname$
     * 机器名称:       $machinename$
     * 命名空间:       $rootnamespace$
     * 文 件 名:       $safeitemname$
     * 创建时间:       $time$
     * 作    者:          xxx
     * 说   明:。。。。。
     * 修改时间:
     * 修 改 人:
    *************************************************************************************/
5.之后新建的类文件在其他头部就会自动添加注释。

6.附上我使用的格式:

/*****************************************************
** 命名空间: $rootnamespace$
** 文 件 名:$safeitemname$
** 内容简述:
** 版    本:V1.0
** 创 建 人:
** 创建日期:$time$
** 修改记录:
日期        版本      修改人    修改内容   
*****************************************************/




  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值