new starting point new beginning
学习、合作、共赢

用了这么多多年的Visual Studio,说实话也就会用几个小快捷键。最近跟同事交流文件注释如何更方便,新学到了一招,呵呵——修改VS的模版文件,添加文件时会自动生成相关注释 。

一、模版文件位置(我VS是安装在C盘)

   C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\ItemTemplatesCache\CSharp\Code\2052\Class.zip

二、模版修改

   各位可根据自己需要进行修改,下面是我修改后的模版 

  

 1 #region Copyright

 

 2 //----------------------------------------------------------------
 3 // Copyright (C) $year$ *********公司*** 版权所有。 
 4 //
 5 // 文件名 $safeitemrootname$
 6 //
 7 // 文件功能描述
 8 // TODO
 9 // 
10 // 创建标识:姓名 Create at $time$
11 // 修改标识:
12 // 修改描述:
13 //
14 // 修改标识:
15 // 修改描述:
16 //----------------------------------------------------------------
17 #endregion
18 using System;
19 using System.Collections.Generic;
20 $if$ ($targetframeworkversion$ == 3.5)using System.Linq;
21 $endif$using System.Text;
22 
23 namespace $rootnamespace$
24 {
25     class $safeitemrootname$
26     {
27     }

28 } 

 

posted on 2012-09-18 14:46  xpengfee  阅读(450)  评论(0编辑  收藏  举报